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 ListenerMusicPlayer by hefuyicoder.
the class QuickControlsFragment method onPlayQueueClick.
@OnClick(R.id.ic_play_queue)
public void onPlayQueueClick() {
FragmentManager fm = getActivity().getSupportFragmentManager();
if (bottomDialogFragment == null) {
bottomDialogFragment = new PlayqueueDialog();
}
bottomDialogFragment.show(fm, "fragment_bottom_dialog");
if (mSwatch != null) {
bottomDialogFragment.setPaletteSwatch(mSwatch);
}
}
use of butterknife.OnClick in project AndroidUtilLib by SiberiaDante.
the class SDJumpUtilActivity method onViewClicked.
@OnClick({ R.id.btn_start_activity1, R.id.btn_start_activity2, R.id.btn_start_activity3, R.id.btn_start_activity4, R.id.btn_open_setting, R.id.btn_open_setting_details, R.id.btn_open_wifi_setting, R.id.btn_open_network_setting, R.id.btn_open_browser, R.id.btn_open_email, R.id.btn_send_email, R.id.btn_open_location_setting, R.id.btn_open_language_setting, R.id.btn_open_call, R.id.btn_open_send_sms, R.id.btn_open_send_sms_client })
public void onViewClicked(View view) {
switch(view.getId()) {
case R.id.btn_start_activity1:
SDJumpUtil.startActivity(SecondActivity.class);
break;
case R.id.btn_start_activity2:
Bundle bundle = new Bundle();
bundle.putString("message", "通过Bundle传值启动的Activity");
SDJumpUtil.startActivity(SecondActivity.class, bundle);
break;
case R.id.btn_start_activity3:
// SDJumpUtil.startActivity(SecondActivity.class);
break;
case R.id.btn_start_activity4:
SDJumpUtil.startActivity(this, SecondActivity.class.getName(), R.anim.view_in, R.anim.view_out);
break;
case R.id.btn_open_setting:
SDJumpUtil.openSetting();
break;
case R.id.btn_open_setting_details:
SDJumpUtil.openAppSetting();
break;
case R.id.btn_open_wifi_setting:
SDJumpUtil.openWifiSetting();
break;
case R.id.btn_open_network_setting:
SDJumpUtil.openNetWorkSetting();
break;
case R.id.btn_open_browser:
SDJumpUtil.openBrowser(Constants.B_LOG);
break;
case R.id.btn_open_email:
SDJumpUtil.openEmail(Constants.QQ_EMAIL);
break;
case R.id.btn_send_email:
SDJumpUtil.sendEmail(Constants.QQ_EMAIL, "这里是一个邮件标题", "这里是邮件内容");
break;
case R.id.btn_open_location_setting:
SDJumpUtil.openLocationSetting();
break;
case R.id.btn_open_language_setting:
SDJumpUtil.openLanguageSetting();
break;
case R.id.btn_open_call:
SDJumpUtil.openCall("10086");
break;
case R.id.btn_open_send_sms:
SDJumpUtil.openSendSms("10086", "余额");
break;
case R.id.btn_open_send_sms_client:
SDJumpUtil.openSendSmsSilent("10086", "余额");
break;
}
}
use of butterknife.OnClick in project apps-android-wikipedia by wikimedia.
the class PageHeaderView method onEditClick.
@OnClick(R.id.view_page_header_edit_pencil)
void onEditClick() {
if (allowDescriptionEdit) {
PopupMenu menu = new PopupMenu(editPencil.getContext(), editPencil, Gravity.END, 0, R.style.PagePopupMenu);
menu.getMenuInflater().inflate(R.menu.menu_page_header_edit, menu.getMenu());
menu.setOnMenuItemClickListener(new EditMenuClickListener());
menu.show();
} else {
if (callback != null) {
callback.onEditLeadSection();
}
}
}
Aggregations