Search in sources :

Example 66 with OnClick

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);
}
Also used : Intent(android.content.Intent) OnClick(butterknife.OnClick)

Example 67 with OnClick

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);
}
Also used : ComicSeriesViewModel(com.karumi.rosie.sample.comics.view.viewmodel.ComicSeriesViewModel) OnClick(butterknife.OnClick)

Example 68 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 69 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 70 with OnClick

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;
    }
}
Also used : AlertDialog(android.support.v7.app.AlertDialog) DialogInterface(android.content.DialogInterface) OnClick(butterknife.OnClick)

Aggregations

OnClick (butterknife.OnClick)202 Intent (android.content.Intent)88 AlertDialog (android.support.v7.app.AlertDialog)11 View (android.view.View)11 DialogInterface (android.content.DialogInterface)10 Action0 (rx.functions.Action0)10 Bundle (android.os.Bundle)8 GCM (com.kickstarter.models.pushdata.GCM)8 PushNotificationEnvelope (com.kickstarter.services.apiresponses.PushNotificationEnvelope)8 File (java.io.File)8 TextView (android.widget.TextView)7 ActivityOptions (android.app.ActivityOptions)6 LzyResponse (com.lzy.demo.model.LzyResponse)6 ServerModel (com.lzy.demo.model.ServerModel)6 Subscription (rx.Subscription)6 NonNull (android.support.annotation.NonNull)5 ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)5 CustomBubblePopup (com.flyco.dialogsamples.extra.CustomBubblePopup)5 Activity (com.kickstarter.models.pushdata.Activity)5 ArrayList (java.util.ArrayList)5