Search in sources :

Example 26 with OnClick

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());
    }
}
Also used : Song(io.github.ryanhoo.music.data.model.Song) OnClick(butterknife.OnClick)

Example 27 with OnClick

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);
}
Also used : PlayMode(io.github.ryanhoo.music.player.PlayMode) OnClick(butterknife.OnClick)

Example 28 with OnClick

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);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) PlayqueueDialog(io.hefuyi.listener.ui.dialogs.PlayqueueDialog) OnClick(butterknife.OnClick)

Example 29 with OnClick

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;
    }
}
Also used : SecondActivity(com.siberiadante.utilsample.SecondActivity) Bundle(android.os.Bundle) OnClick(butterknife.OnClick)

Example 30 with OnClick

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();
        }
    }
}
Also used : PopupMenu(android.support.v7.widget.PopupMenu) OnClick(butterknife.OnClick)

Aggregations

OnClick (butterknife.OnClick)465 Intent (android.content.Intent)206 View (android.view.View)24 AlertDialog (android.support.v7.app.AlertDialog)21 TextView (android.widget.TextView)18 File (java.io.File)18 Bundle (android.os.Bundle)16 BindView (butterknife.BindView)16 DialogInterface (android.content.DialogInterface)15 ArrayList (java.util.ArrayList)15 DialogFragment (com.rey.material.app.DialogFragment)13 SimpleDialog (com.rey.material.app.SimpleDialog)13 Uri (android.net.Uri)11 SimpleDateFormat (java.text.SimpleDateFormat)11 SuppressLint (android.annotation.SuppressLint)10 ImageView (android.widget.ImageView)10 LzyResponse (com.lzy.demo.model.LzyResponse)10 HorizontalChangeHandler (com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler)9 List (java.util.List)9 Animator (android.animation.Animator)8