use of com.materiallib.devpaul.materiallibrary.list.SimpleRecyclerViewAdapter in project MaterialLibrary by DeveloperPaul123.
the class CollapsingToolbarRecycler method init.
@Override
public void init() {
List<ListItem> items = new ArrayList<>();
for (int i = 0; i < 45; i++) {
items.add(new ListItem("Item " + i));
}
getRecyclerView().setItemAnimator(new DefaultItemAnimator());
getRecyclerView().setLayoutManager(new LinearLayoutManager(this));
SimpleRecyclerViewAdapter adapter = new SimpleRecyclerViewAdapter(this, items);
getRecyclerView().setAdapter(adapter);
getCollapsingToolbarLayout().setTitle(getToolbar().getTitle());
getCollapsingToolbarLayout().setExpandedTitleColor(getResources().getColor(android.R.color.white));
}
use of com.materiallib.devpaul.materiallibrary.list.SimpleRecyclerViewAdapter in project MaterialLibrary by DeveloperPaul123.
the class CollapsingToolbarFab method init.
@Override
public void init() {
// uncomment to make the fab appear on the left.
// setFloatingActionButtonAlignLeft(true);
List<ListItem> items = new ArrayList<>();
for (int i = 0; i < 45; i++) {
items.add(new ListItem("Item " + i));
}
getRecyclerView().setItemAnimator(new DefaultItemAnimator());
getRecyclerView().setLayoutManager(new LinearLayoutManager(this));
SimpleRecyclerViewAdapter adapter = new SimpleRecyclerViewAdapter(this, items);
getRecyclerView().setAdapter(adapter);
getCollapsingToolbarLayout().setTitle(getToolbar().getTitle());
getCollapsingToolbarLayout().setExpandedTitleColor(getResources().getColor(android.R.color.white));
}
use of com.materiallib.devpaul.materiallibrary.list.SimpleRecyclerViewAdapter in project MaterialLibrary by DeveloperPaul123.
the class QuickReturnActivity method init.
@Override
public void init() {
List<ListItem> items = new ArrayList<>();
for (int i = 0; i < 45; i++) {
items.add(new ListItem("Item " + i));
}
getRecyclerView().setHasFixedSize(true);
getRecyclerView().setItemAnimator(new DefaultItemAnimator());
getRecyclerView().setLayoutManager(new LinearLayoutManager(this));
SimpleRecyclerViewAdapter adapter = new SimpleRecyclerViewAdapter(this, items);
getRecyclerView().setAdapter(adapter);
}
use of com.materiallib.devpaul.materiallibrary.list.SimpleRecyclerViewAdapter in project MaterialLibrary by DeveloperPaul123.
the class ToolbarRecyclerActivity method init.
@Override
public void init() {
// just make some simple list items.
List<ListItem> items = new ArrayList<>();
for (int i = 0; i < 45; i++) {
items.add(new ListItem("Item " + i));
}
SimpleRecyclerViewAdapter adapter = new SimpleRecyclerViewAdapter(this, items);
getRecyclerView().setAdapter(adapter);
}
Aggregations