use of com.bluestacks.bugzy.ui.common.CaseAdapter in project bugzy by cpunq.
the class MyCasesFragment method onActivityCreated.
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
setupSortingView();
mViewModel = ViewModelProviders.of(this, mViewModelFactory).get(MyCasesViewModel.class);
if (mHomeActivityCallbacks != null) {
mHomeActivityCallbacks.onFragmentsActivityCreated(this, mFilterText, getTag());
}
this.subscribeToViewModel();
LinearLayoutManager mLinearLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLinearLayoutManager);
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity().getApplicationContext(), DividerItemDecoration.VERTICAL));
mAdapter = new CaseAdapter(mCases, this);
mRecyclerView.setAdapter(mAdapter);
// Load cases
mViewModel.loadCases(mFilter);
}
use of com.bluestacks.bugzy.ui.common.CaseAdapter in project bugzy by cpunq.
the class SearchActivity method setupViews.
private void setupViews() {
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
prepareSearchEditText();
mSearchSuggestionAdapter = new SearchSuggestionAdapter(position -> {
if (mSearchSuggestions == null) {
return;
}
mViewModel.searchSuggestionSelected(mSearchSuggestions.get(position));
});
mSearchSuggestionView.setLayoutManager(new LinearLayoutManager(this));
mSearchSuggestionView.setAdapter(mSearchSuggestionAdapter);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.addItemDecoration(new DividerItemDecoration(getApplicationContext(), DividerItemDecoration.VERTICAL));
mAdapter = new CaseAdapter(mCases, this);
mRecyclerView.setAdapter(mAdapter);
prepareSearchHistoryRecyclerView();
}
Aggregations