Please Check the Images
I want to hide and show all system bars (status bar, Action Bar and Bottom Navigation Bar) in every clicks on the activity screen.
Please Check the Images
I want to hide and show all system bars (status bar, Action Bar and Bottom Navigation Bar) in every clicks on the activity screen.
On the first click set onClickListner that will lead to a new activity that only will display the image (ImageView) with a black background. In the new activity make sure it is a full-screen activity:
Programmatically:
public class ActivityName extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// remove title
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
//Here display your image with an ImageView
//Here set another onClickListner on the image or the background (the layout) that leads to the previous activity and finish() this one.
}
}
Or in AndroidManifest.xml
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
If it is AppCompatActivity
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>