I have a question about how to set a time for image that was opened close. Would it be a tie?
I'm using ImageView
:
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageView1"
android:visibility="invisible"
android:src="@drawable/nomeDaSuaImagem" />
In the Activity code, on the button's onClick, make it visible:
Button button1;
ImageView imageView1;
imageView1 = (ImageView) findViewById(R.id.imageView1);
button1 = (Button) findViewById(R.id.button1);
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
imageView1.setVisibility(View.VISIBLE);
}
});
The image is visible, so when you spend a few seconds it becomes invisible.