//issue - this method is not invoked for the second time cancel_video_image_view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(), "You clicked the button", Toast.LENGTH_SHORT).show(); one_video_gallary_imageview.setVisibility(View.INVISIBLE); one_video_gallary_thumbnail.setVisibility(View.INVISIBLE); cancel_video_image_view.setVisibility(View.INVISIBLE); info_one_video_gallery.setVisibility(View.INVISIBLE); monument_name_one_video_gallery.setVisibility(View.INVISIBLE); } });
A
Alexander Bendl
said
almost 7 years ago
Hi Mithun Kumar,
is it only the cancel button which doesn't work or is it the other imageViews as well? If it is only the cancel button my guess would be that you could declare the cancel_video_image_view as member like you did with the other imageViews. This way the ImageView and with it the onClickListener should still exist after you leave the runnable.
Best regards Alex
m
mithun kumar
said
almost 7 years ago
Hi Alex.
Thank you for taking your time to look on this issue. Only cancel image not working, other images working fine and I tried exactly same way as you explained in the post, but it is also not working. as for now i am refreshing(restarting) the screen, it works but user will notice that screen is recreating. can you let me know if there is any another way to solve this.
mithun kumar