Search in sources :

Example 71 with OnClick

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

Example 72 with OnClick

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

Example 73 with OnClick

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

Example 74 with OnClick

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);
        }
    });
}
Also used : BackendObject(io.divide.client.BackendObject) Query(io.divide.shared.transitory.query.Query) Collection(java.util.Collection) QueryBuilder(io.divide.shared.transitory.query.QueryBuilder) OnClick(butterknife.OnClick)

Example 75 with OnClick

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;
    }
}
Also used : UpdatePasswordActivity(com.twtstudio.bbs.bdpqchen.bbs.individual.updatePassword.UpdatePasswordActivity) Intent(android.content.Intent) 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