use of com.example.jingbin.cloudreader.utils.PerfectClickListener in project CloudReader by youlookwhat.
the class NavDownloadActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_nav_download);
showContentView();
setTitle("扫码下载");
String url = "https://fir.im/cloudreader";
QRCodeUtil.showThreadImage(this, url, bindingView.ivErweima, R.drawable.ic_cloudreader_mip);
bindingView.tvShare.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
ShareUtils.share(v.getContext(), R.string.string_share_text);
}
});
}
use of com.example.jingbin.cloudreader.utils.PerfectClickListener in project CloudReader by youlookwhat.
the class TransitionActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBinding = DataBindingUtil.setContentView(this, R.layout.activity_transition);
int i = new Random().nextInt(ConstantsImageUrl.TRANSITION_URLS.length);
// 先显示默认图
mBinding.ivDefultPic.setImageDrawable(CommonUtils.getDrawable(R.drawable.img_transition_default));
Glide.with(this).load(ConstantsImageUrl.TRANSITION_URLS[i]).placeholder(R.drawable.img_transition_default).error(R.drawable.img_transition_default).into(mBinding.ivPic);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mBinding.ivDefultPic.setVisibility(View.GONE);
}
}, 1500);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
toMainActivity();
}
}, 3500);
// Animation animation = AnimationUtils.loadAnimation(this, R.anim.transition_anim);
// animation.setAnimationListener(animationListener);
// mBinding.ivPic.startAnimation(animation);
mBinding.tvJump.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
toMainActivity();
// animationEnd();
}
});
}
use of com.example.jingbin.cloudreader.utils.PerfectClickListener in project CloudReader by youlookwhat.
the class EverydayFragment method initLocalSetting.
private void initLocalSetting() {
mEverydayModel.setData(getTodayTime().get(0), getTodayTime().get(1), getTodayTime().get(2));
// DebugUtil.error("" + year + month + day);
// 显示日期,去掉第一位的"0"
mHeaderBinding.includeEveryday.tvDailyText.setText(getTodayTime().get(2).indexOf("0") == 0 ? getTodayTime().get(2).replace("0", "") : getTodayTime().get(2));
mHeaderBinding.includeEveryday.ibXiandu.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
WebViewActivity.loadUrl(v.getContext(), "https://gank.io/xiandu", "加载中...");
}
});
mHeaderBinding.includeEveryday.ibMovieHot.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
RxBus.getDefault().post(RxCodeConstants.JUMP_TYPE_TO_ONE, new RxBusBaseMessage());
}
});
}
use of com.example.jingbin.cloudreader.utils.PerfectClickListener in project CloudReader by youlookwhat.
the class BaseFragment method onActivityCreated.
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mLlProgressBar = getView(R.id.ll_progress_bar);
ImageView img = getView(R.id.img_progress);
// 加载动画
mAnimationDrawable = (AnimationDrawable) img.getDrawable();
// 默认进入页面就开启动画
if (!mAnimationDrawable.isRunning()) {
mAnimationDrawable.start();
}
mRefresh = getView(R.id.ll_error_refresh);
// 点击加载失败布局
mRefresh.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
showLoading();
onRefresh();
}
});
bindingView.getRoot().setVisibility(View.GONE);
}
Aggregations