use of butterknife.OnClick in project jianshi by wingjay.
the class MainActivity method toSettingsPage.
@OnClick(R.id.setting)
void toSettingsPage(View v) {
Intent intent = new Intent(MainActivity.this, SettingActivity.class);
startActivityForResult(intent, Constants.RequestCode.REQUEST_CODE_BG_COLOR_CHANGE);
}
use of butterknife.OnClick in project Rosie by Karumi.
the class ComicSeriesRenderer method onItemClicked.
@OnClick(R.id.ll_root)
public void onItemClicked() {
ComicSeriesViewModel comicSeries = getContent();
presenter.onComicSeriesClicked(comicSeries);
}
use of butterknife.OnClick in project StylishMusicPlayer by ryanhoo.
the class MusicPlayerFragment method onFavoriteToggleAction.
@OnClick(R.id.button_favorite_toggle)
public void onFavoriteToggleAction(View view) {
if (mPlayer == null)
return;
Song currentSong = mPlayer.getPlayingSong();
if (currentSong != null) {
view.setEnabled(false);
mPresenter.setSongAsFavorite(currentSong, !currentSong.isFavorite());
}
}
use of butterknife.OnClick in project StylishMusicPlayer by ryanhoo.
the class MusicPlayerFragment method onPlayModeToggleAction.
@OnClick(R.id.button_play_mode_toggle)
public void onPlayModeToggleAction(View view) {
if (mPlayer == null)
return;
PlayMode current = PreferenceManager.lastPlayMode(getActivity());
PlayMode newMode = PlayMode.switchNextMode(current);
PreferenceManager.setPlayMode(getActivity(), newMode);
mPlayer.setPlayMode(newMode);
updatePlayMode(newMode);
}
use of butterknife.OnClick in project JustAndroid by chinaltz.
the class ShopFragment method onClick.
@OnClick({ R.id.all_chekbox, R.id.tv_go_to_pay })
public void onClick(View view) {
AlertDialog alert;
switch(view.getId()) {
case R.id.all_chekbox:
doCheckAll();
break;
case R.id.tv_go_to_pay:
if (totalCount == 0) {
Toast.makeText(context, "请选择要支付的商品", Toast.LENGTH_LONG).show();
return;
}
alert = new AlertDialog.Builder(context).create();
alert.setTitle("操作提示");
alert.setMessage("总计:\n" + totalCount + "种商品\n" + totalPrice + "元");
alert.setButton(DialogInterface.BUTTON_NEGATIVE, "取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
return;
}
});
alert.setButton(DialogInterface.BUTTON_POSITIVE, "确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
return;
}
});
alert.show();
break;
}
}
Aggregations