use of com.xabber.android.ui.adapter.BookmarkAdapter in project xabber-android by redsolution.
the class BookmarksActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bokmarks);
final Intent intent = getIntent();
AccountJid account = getAccount(intent);
if (account == null) {
finish();
return;
}
accountItem = AccountManager.getInstance().getAccount(account);
if (accountItem == null) {
Application.getInstance().onError(R.string.NO_SUCH_ACCOUNT);
finish();
return;
}
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) {
finish();
}
});
toolbar.setTitle(R.string.account_bookmarks);
toolbar.inflateMenu(R.menu.toolbar_bookmark_list);
toolbar.setOnMenuItemClickListener(this);
barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.server_info_recycler_view);
bookmarksAdapter = new BookmarkAdapter(this);
bookmarksAdapter.setListener(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(bookmarksAdapter);
progressBar = findViewById(R.id.server_info_progress_bar);
tvNotSupport = (TextView) findViewById(R.id.tvNotSupport);
requestBookmarks(false);
}
Aggregations