1

I have ViewPager + PageAdapter for slide images. I'm trying add Alpha animation button which appears when user tap on screen and disappears when tap again. When I add clickListner for ImageView or for some invisible layout over ImageView animation button works fine, but slider doesn`t work now. What I should do for combine these 2 functions.

imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                final Animation aAnim1 = new AlphaAnimation(1.0f, 0.0f);
                final Animation aAnim2 = new AlphaAnimation(0.0f, 1.0f);

                if (VISIBLE_FLAG == true) {
                    aAnim1.setDuration(250);

                    aAnim1.setFillAfter(true);
                    save_btn.startAnimation(aAnim1);
                    exit_btn.startAnimation(aAnim1);
                    VISIBLE_FLAG = false;
                }
                else {
                    aAnim1.setDuration(250);

                    aAnim1.setFillAfter(true);
                    save_btn.startAnimation(aAnim2);
                    exit_btn.startAnimation(aAnim2);
                    VISIBLE_FLAG = true;
                }
            }
        });
MrStuff88
  • 327
  • 3
  • 11

0 Answers0