Android Studio – problem with setVisibility when swithching between two ImageView elements in Java
imageView1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(imageViewGet1.getDrawable() != null){ imageView1.setVisibility(View.INVISIBLE); imageViewGet1.setVisibility(View.VISIBLE); } OpenGallery1(); } }); imageView2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(imageViewGet2.getDrawable() != null){ imageView2.setVisibility(View.INVISIBLE); imageViewGet2.setVisibility(View.VISIBLE); } OpenGallery2(); } }); when I run the…