I have a button that cause an image to display the image full screen (no/title or notify Bar).
I throw up a toast that say you can tap the screen to restore to normal size with selection buttons up top of the screen. I’m having a brain lock on how to register the SetOnClickListener for the image screen. I have as code.
public void getFull(View v)
{
OnScreen=1;
if(ScreenNoBars==0)ScreenNoBars=1;
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); //gets rid of title bar
ImageView img=new ImageView(this);
img.setImageDrawable(getMyImage(0));
setContentView(img);
img.setOnClickListener((OnClickListener) v); //<<< problem here
Toast.makeText(getApplicationContext(), "Tap Image to restore buttons or Rotate
device.",Toast.LENGTH_LONG).show();
}
you can handle ImageView click directly by doing this