Search in sources :

Example 6 with PerfectClickListener

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);
        }
    });
}
Also used : PerfectClickListener(com.example.jingbin.cloudreader.utils.PerfectClickListener) View(android.view.View)

Example 7 with PerfectClickListener

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();
        }
    });
}
Also used : Random(java.util.Random) PerfectClickListener(com.example.jingbin.cloudreader.utils.PerfectClickListener) Handler(android.os.Handler) View(android.view.View)

Example 8 with PerfectClickListener

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());
        }
    });
}
Also used : PerfectClickListener(com.example.jingbin.cloudreader.utils.PerfectClickListener) View(android.view.View) RxBusBaseMessage(com.example.jingbin.cloudreader.http.rx.RxBusBaseMessage)

Example 9 with PerfectClickListener

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);
}
Also used : PerfectClickListener(com.example.jingbin.cloudreader.utils.PerfectClickListener) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) View(android.view.View)

Aggregations

View (android.view.View)9 PerfectClickListener (com.example.jingbin.cloudreader.utils.PerfectClickListener)9 ImageView (android.widget.ImageView)5 RelativeLayout (android.widget.RelativeLayout)2 DialogInterface (android.content.DialogInterface)1 Handler (android.os.Handler)1 AlertDialog (android.support.v7.app.AlertDialog)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 TextView (android.widget.TextView)1 RxBusBaseMessage (com.example.jingbin.cloudreader.http.rx.RxBusBaseMessage)1 MyNestedScrollView (com.example.jingbin.cloudreader.view.MyNestedScrollView)1 Random (java.util.Random)1