use of butterknife.OnClick in project apps-android-wikipedia by wikimedia.
the class CompilationDetailFragment method onMainPageClick.
@OnClick(R.id.button_compilation_detail_main_page)
void onMainPageClick() {
try {
PageTitle title = new PageTitle(OfflineManager.instance().getMainPageTitle(compilation), WikipediaApp.getInstance().getWikiSite());
HistoryEntry entry = new HistoryEntry(title, HistoryEntry.SOURCE_MAIN_PAGE);
startActivity(PageActivity.newIntentForNewTab(getContext(), entry, entry.getTitle()));
} catch (IOException e) {
L.e(e);
FeedbackUtil.showError(getActivity(), e);
}
}
use of butterknife.OnClick in project collect by opendatakit.
the class ShowQRCodeFragment method chooseButtonClicked.
@OnClick(R.id.btnSelect)
void chooseButtonClicked() {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
if (photoPickerIntent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivityForResult(photoPickerIntent, SELECT_PHOTO);
} else {
ToastUtils.showShortToast(getString(R.string.activity_not_found, getString(R.string.choose_image)));
Timber.w(getString(R.string.activity_not_found, getString(R.string.choose_image)));
}
}
use of butterknife.OnClick in project apps-android-commons by commons-app.
the class NearbyInfoDialog method onDirectionsClick.
@OnClick(R.id.link_preview_directions_button)
void onDirectionsClick() {
//Open map app at given position
Uri gmmIntentUri = Uri.parse("geo:0,0?q=" + location.getLatitude() + "," + location.getLongitude());
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivity(mapIntent);
}
}
use of butterknife.OnClick in project apps-android-commons by commons-app.
the class NavigationBaseFragment method onFeedbackItemClicked.
@OnClick(R.id.feedback_item)
protected void onFeedbackItemClicked() {
closeDrawer();
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
feedbackIntent.setType("message/rfc822");
feedbackIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { CommonsApplication.FEEDBACK_EMAIL });
feedbackIntent.putExtra(Intent.EXTRA_SUBJECT, String.format(CommonsApplication.FEEDBACK_EMAIL_SUBJECT, BuildConfig.VERSION_NAME));
try {
startActivity(feedbackIntent);
} catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();
}
}
use of butterknife.OnClick in project coins-android by bubelov.
the class SignInActivity method onGoogleSignInClick.
@OnClick(R.id.sign_in_with_google)
public void onGoogleSignInClick() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);
startActivityForResult(signInIntent, REQUEST_GOOGLE_SIGN_IN);
}
Aggregations