use of butterknife.OnClick in project Android-Bootstrap by Bearded-Hen.
the class BootstrapProgressBarGroupExample method onClickProgressChange.
@OnClick(R.id.example_progress_bar_group_progress)
void onClickProgressChange() {
Random rand = new Random();
int progress = rand.nextInt(30) + 10;
switch(rand.nextInt(2)) {
case 0:
bootstrapProgressBar1.setProgress(progress);
break;
case 1:
bootstrapProgressBar2.setProgress(progress);
break;
}
}
use of butterknife.OnClick in project Android-Bootstrap by Bearded-Hen.
the class HomeActivity method onGithubClicked.
@OnClick(R.id.github_btn)
void onGithubClicked() {
Intent intent = new Intent(Intent.ACTION_VIEW);
startActivity(intent);
intent.setData(Uri.parse("https://github.com/Bearded-Hen/Android-Bootstrap"));
startActivity(intent);
}
use of butterknife.OnClick in project bilibili-android-client by HotBitmapGG.
the class VideoIntroductionFragment method share.
@OnClick(R.id.btn_share)
void share() {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "分享");
intent.putExtra(Intent.EXTRA_TEXT, "来自「哔哩哔哩」的分享:" + mVideoDetailsInfo.getDesc());
startActivity(Intent.createChooser(intent, mVideoDetailsInfo.getTitle()));
}
use of butterknife.OnClick in project FlycoDialog_Master by H07000223.
the class BubblePopupActivity method clickTopLeftBtn.
@OnClick(R.id.tv_top_left)
void clickTopLeftBtn() {
View inflate = View.inflate(mContext, R.layout.popup_bubble_text, null);
TextView tv = ButterKnife.findById(inflate, R.id.tv_bubble);
BubblePopup bubblePopup = new BubblePopup(mContext, inflate);
tv.setText("最美的不是下雨天,是曾与你躲过雨的屋檐~");
bubblePopup.anchorView(mTvTopLeft).gravity(Gravity.BOTTOM).show();
tv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
T.showShort(mContext, "tv_bubble");
}
});
}
use of butterknife.OnClick in project FlycoDialog_Master by H07000223.
the class BubblePopupActivity method clickTopRightBtn.
@OnClick(R.id.tv_top_right)
void clickTopRightBtn() {
CustomBubblePopup customBubblePopup = new CustomBubblePopup(mContext);
// customBubblePopup.setCanceledOnTouchOutside(false);
customBubblePopup.gravity(Gravity.BOTTOM).anchorView(mTvTopRight).triangleWidth(20).triangleHeight(10).showAnim(null).dismissAnim(null).show();
}
Aggregations