use of org.odk.collect.android.projects.ProjectIconView in project collect by opendatakit.
the class MainMenuActivity method onPrepareOptionsMenu.
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
final MenuItem projectsMenuItem = menu.findItem(R.id.projects);
ProjectIconView projectIconView = (ProjectIconView) projectsMenuItem.getActionView();
projectIconView.setProject(currentProjectViewModel.getCurrentProject().getValue());
projectIconView.setOnClickListener(v -> onOptionsItemSelected(projectsMenuItem));
projectIconView.setContentDescription(getString(R.string.projects));
return super.onPrepareOptionsMenu(menu);
}
Aggregations