Search in sources :

Example 1 with NotificationListAdapter

use of com.owncloud.android.ui.adapter.NotificationListAdapter in project android by nextcloud.

the class NotificationsActivity method setupContent.

/**
 * sets up the UI elements and loads all activity items.
 */
private void setupContent() {
    emptyContentIcon.setImageResource(R.drawable.ic_notification_light_grey);
    emptyContentProgressBar.getIndeterminateDrawable().setColorFilter(ThemeUtils.primaryAccentColor(), PorterDuff.Mode.SRC_IN);
    setLoadingMessage();
    adapter = new NotificationListAdapter(this);
    recyclerView.setAdapter(adapter);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), layoutManager.getOrientation());
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.addItemDecoration(dividerItemDecoration);
    BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_navigation_view);
    if (getResources().getBoolean(R.bool.bottom_toolbar_enabled)) {
        bottomNavigationView.setVisibility(View.VISIBLE);
        DisplayUtils.setupBottomBar(bottomNavigationView, getResources(), this, -1);
    }
    fetchAndSetData();
}
Also used : NotificationListAdapter(com.owncloud.android.ui.adapter.NotificationListAdapter) BottomNavigationView(android.support.design.widget.BottomNavigationView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration)

Aggregations

BottomNavigationView (android.support.design.widget.BottomNavigationView)1 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 NotificationListAdapter (com.owncloud.android.ui.adapter.NotificationListAdapter)1