use of com.xabber.android.ui.adapter.OccupantListAdapter in project xabber-android by redsolution.
the class OccupantList method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isFinishing()) {
return;
}
account = getAccount(getIntent());
room = Jid.getBareAddress(getUser(getIntent()));
if (account == null || room == null || !MUCManager.getInstance().hasRoom(account, room)) {
Application.getInstance().onError(R.string.ENTRY_IS_NOT_FOUND);
finish();
return;
}
setContentView(R.layout.list);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(OccupantList.this);
}
});
toolbar.setTitle(room);
BarPainter barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
listAdapter = new OccupantListAdapter(this, account, room);
setListAdapter(listAdapter);
getListView().setOnItemClickListener(this);
}
Aggregations