use of butterknife.OnClick in project JustAndroid by chinaltz.
the class LanuchActivity method onViewClicked.
@OnClick(R.id.countButton)
public void onViewClicked() {
myCount.cancel();
Intent in = new Intent(mContext, MainActivity.class);
startActivity(in);
finish();
}
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 divide by HiddenStage.
the class MyActivity method getObjects.
@OnClick(R.id.getObjects)
public void getObjects() {
final Query q = new QueryBuilder().select().from(BackendObject.class).limit(10).build();
BackendServices.remote().query(BackendObject.class, q).subscribe(new Action1<Collection<BackendObject>>() {
@Override
public void call(Collection<BackendObject> objects) {
objectList.clear();
objectList.addAll(objects);
adapter.notifyDataSetChanged();
// BackendServices.local().save((BackendObject[]) objects.toArray());
// List<BackendObject> col = BackendServices.local().query(q);
// for (BackendObject o : col) logger.debug(o);
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
logger.debug("", throwable);
}
});
}
use of butterknife.OnClick in project BBS-Android by bdpqchen.
the class UpdateInfoActivity method onViewClicked.
@OnClick({ R.id.rl_avatar_update_info, R.id.rl_nickname_update_info, R.id.rl_signature_update_info, R.id.rl_password_update_info })
public void onViewClicked(View view) {
switch(view.getId()) {
case R.id.rl_avatar_update_info:
hasPermission();
break;
case R.id.rl_nickname_update_info:
showInputDialog("更改昵称", mNickname, 15, (materialDialog, charSequence) -> {
String s = charSequence.toString();
mNickname = s;
mTvNicknameUpdate.setText(s);
});
break;
case R.id.rl_signature_update_info:
showInputDialog("更改签名", "最大汉字长度为", 100, (materialDialog, charSequence) -> {
String s = charSequence.toString();
mSignature = s;
mTvSignatureUpdate.setText(s);
});
break;
case R.id.rl_password_update_info:
startActivity(new Intent(this, UpdatePasswordActivity.class));
break;
}
}
Aggregations