use of butterknife.OnItemClick in project apps-android-commons by commons-app.
the class NearbyListFragment method onItemClicked.
@OnItemClick(R.id.listView)
void onItemClicked(int position) {
Place place = (Place) listview.getItemAtPosition(position);
LatLng placeLatLng = place.location;
double latitude = placeLatLng.getLatitude();
double longitude = placeLatLng.getLongitude();
Timber.d("Item at position %d has coords: Lat: %f Long: %f", position, latitude, longitude);
NearbyInfoDialog.showYourself(getActivity(), place);
}
use of butterknife.OnItemClick in project SQLPractice by Gear61.
the class SettingsActivity method onItemClick.
@OnItemClick(R.id.settings_options)
public void onItemClick(int position) {
Intent intent = null;
switch(position) {
case 0:
String uriText = "mailto:" + SUPPORT_EMAIL + "?subject=" + Uri.encode(feedbackSubject);
Uri mailUri = Uri.parse(uriText);
Intent sendIntent = new Intent(Intent.ACTION_SENDTO, mailUri);
sendIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(Intent.createChooser(sendIntent, sendEmail));
return;
case 1:
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(OTHER_APPS_URL));
break;
case 2:
Uri uri = Uri.parse("market://details?id=" + getApplicationContext().getPackageName());
intent = new Intent(Intent.ACTION_VIEW, uri);
if (!(getPackageManager().queryIntentActivities(intent, 0).size() > 0)) {
Utils.showSnackbar(parent, getString(R.string.play_store_error));
return;
}
break;
case 3:
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(REPO_URL));
break;
case 4:
intent = new Intent(this, DatabaseTablesActivity.class);
}
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
use of butterknife.OnItemClick in project SQLPractice by Gear61.
the class MainActivity method onItemClick.
@OnItemClick(R.id.question_list)
public void onItemClick(int position) {
Intent intent = new Intent(this, QuestionActivity.class);
intent.putExtra(Constants.QUESTION_NUMBER_KEY, position);
startActivity(intent);
}
use of butterknife.OnItemClick in project apps-android-wikipedia by wikimedia.
the class SearchResultsFragment method onItemClick.
@OnItemClick(R.id.search_results_list)
void onItemClick(ListView view, int position) {
Callback callback = callback();
if (callback != null) {
PageTitle item = ((SearchResult) getAdapter().getItem(position)).getPageTitle();
callback.navigateToTitle(item, false, position);
}
}
Aggregations