Search in sources :

Example 46 with OnClick

use of butterknife.OnClick in project plaid by nickbutcher.

the class PostNewDesignerNewsStory method postNewStory.

@OnClick(R.id.new_story_post)
protected void postNewStory() {
    if (DesignerNewsPrefs.get(this).isLoggedIn()) {
        ImeUtils.hideIme(title);
        Intent postIntent = new Intent(PostStoryService.ACTION_POST_NEW_STORY, null, this, PostStoryService.class);
        postIntent.putExtra(PostStoryService.EXTRA_STORY_TITLE, title.getText().toString());
        postIntent.putExtra(PostStoryService.EXTRA_STORY_URL, url.getText().toString());
        postIntent.putExtra(PostStoryService.EXTRA_STORY_COMMENT, comment.getText().toString());
        postIntent.putExtra(PostStoryService.EXTRA_BROADCAST_RESULT, getIntent().getBooleanExtra(PostStoryService.EXTRA_BROADCAST_RESULT, false));
        startService(postIntent);
        setResult(RESULT_POSTING);
        finishAfterTransition();
    } else {
        Intent login = new Intent(this, DesignerNewsLogin.class);
        MorphTransform.addExtras(login, ContextCompat.getColor(this, R.color.designer_news), 0);
        ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, post, getString(R.string.transition_designer_news_login));
        startActivity(login, options.toBundle());
    }
}
Also used : Intent(android.content.Intent) ActivityOptions(android.app.ActivityOptions) OnClick(butterknife.OnClick)

Example 47 with OnClick

use of butterknife.OnClick in project plaid by nickbutcher.

the class SearchActivity method doSave.

@OnClick(R.id.save_confirmed)
protected void doSave() {
    Intent saveData = new Intent();
    saveData.putExtra(EXTRA_QUERY, dataManager.getQuery());
    saveData.putExtra(EXTRA_SAVE_DRIBBBLE, saveDribbble.isChecked());
    saveData.putExtra(EXTRA_SAVE_DESIGNER_NEWS, saveDesignerNews.isChecked());
    setResult(RESULT_CODE_SAVE, saveData);
    dismiss();
}
Also used : Intent(android.content.Intent) OnClick(butterknife.OnClick)

Example 48 with OnClick

use of butterknife.OnClick in project DraggablePanel by pedrovgs.

the class MainActivity method openSimpleSampleActivity.

@OnClick(R.id.iv_places)
void openSimpleSampleActivity() {
    Intent intent = new Intent(this, PlacesSampleActivity.class);
    startActivity(intent);
}
Also used : Intent(android.content.Intent) OnClick(butterknife.OnClick)

Example 49 with OnClick

use of butterknife.OnClick in project Weather by Sparker0i.

the class AboutActivity method onClick.

@OnClick(R.id.fab)
void onClick() {
    Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + Constants.MAIL));
    startActivity(Intent.createChooser(intent, getString(R.string.choose_app)));
}
Also used : Intent(android.content.Intent) OnClick(butterknife.OnClick)

Example 50 with OnClick

use of butterknife.OnClick in project simple-stack by Zhuinden.

the class CloudSyncView method clickButton.

@OnClick(R.id.first_button)
public void clickButton(View view) {
    Key key = Backstack.getKey(getContext());
    key.selectDelegate(getContext()).getBackstack().goTo(AnotherKey.create());
}
Also used : AnotherKey(com.zhuinden.simplestackdemomultistack.presentation.paths.main.cloudsync.another.AnotherKey) Key(com.zhuinden.simplestackdemomultistack.application.Key) 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