use of com.xabber.android.data.notification.custom_notification.Key in project xabber-android by redsolution.
the class CustomNotifySettings method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_with_toolbar_and_container);
account = EntityIntentBuilder.getAccount(getIntent());
user = EntityIntentBuilder.getUser(getIntent());
group = getIntent().getStringExtra(GROUP_KEY);
phraseID = getIntent().getLongExtra(PHRASE_ID_KEY, -1);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setTitle(getTitle());
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(CustomNotifySettings.this);
}
});
BarPainter barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
if (savedInstanceState == null) {
Key key = Key.createKey(account, user, group, phraseID);
if (key == null)
finish();
getFragmentManager().beginTransaction().add(R.id.fragment_container, CustomNotifSettingsFragment.createInstance(this, key)).commit();
}
}
Aggregations