use of uk.ivanc.archimvp.RepositoryAdapter in project archi by ivacf.
the class MainActivity method setupRecyclerView.
private void setupRecyclerView(RecyclerView recyclerView) {
RepositoryAdapter adapter = new RepositoryAdapter();
adapter.setCallback(new RepositoryAdapter.Callback() {
@Override
public void onItemClick(Repository repository) {
startActivity(RepositoryActivity.newIntent(MainActivity.this, repository));
}
});
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
}
use of uk.ivanc.archimvp.RepositoryAdapter in project archi by ivacf.
the class MainActivity method showRepositories.
@Override
public void showRepositories(List<Repository> repositories) {
RepositoryAdapter adapter = (RepositoryAdapter) reposRecycleView.getAdapter();
adapter.setRepositories(repositories);
adapter.notifyDataSetChanged();
reposRecycleView.requestFocus();
hideSoftKeyboard();
progressBar.setVisibility(View.INVISIBLE);
infoTextView.setVisibility(View.INVISIBLE);
reposRecycleView.setVisibility(View.VISIBLE);
}
Aggregations