Android Show Custom Nav and Footer on Tap Like ImageViewer -


i want show activity full screen , want show/hide custom title bar button , footer 1 button only. full screen image viewer android if activity :

enter image description here

when touch , tap anywhere in screen should like:

enter image description here

update


i have searched lot haven't find proper solution. want android 4.2 jelly bean (api level 17).

i got solution [immersive full-screen mode]3 android 4.4 kitkat (api level 19).

any advice appreciated!

try now:

activity_main.xml :

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/rlmain"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="#f2af2a" >  </relativelayout> 

mainactivity.java :

public class mainactivity extends activity {     handler mhandler = new handler();     relativelayout rlmain;     runnable mrunnable = new runnable() {          @suppresslint("newapi")         @override         public void run() {             if (android.os.build.version.sdk_int > android.os.build.version_codes.honeycomb)                 getwindow().getdecorview().setsystemuivisibility(view.system_ui_flag_layout_stable | view.system_ui_flag_layout_hide_navigation | view.system_ui_flag_layout_fullscreen | view.system_ui_flag_hide_navigation | view.system_ui_flag_fullscreen | view.system_ui_flag_immersive_sticky);         }     };      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);         rlmain = (relativelayout) findviewbyid(r.id.rlmain);          mhandler.postdelayed(mrunnable, 1500);          rlmain.setonclicklistener(new view.onclicklistener() {              @suppresslint("newapi")             @override             public void onclick(view arg0) {                 if (android.os.build.version.sdk_int > android.os.build.version_codes.honeycomb) {                     if (!(getwindow().getdecorview().getsystemuivisibility() == view.system_ui_flag_visible)) {                         getwindow().getdecorview().setsystemuivisibility(view.system_ui_flag_visible);                     } else {                         getwindow().getdecorview().setsystemuivisibility(view.system_ui_flag_layout_stable | view.system_ui_flag_layout_hide_navigation | view.system_ui_flag_layout_fullscreen | view.system_ui_flag_hide_navigation | view.system_ui_flag_fullscreen | view.system_ui_flag_immersive_sticky);                     }                 }                 mhandler.removecallbacks(mrunnable);                 mhandler.postdelayed(mrunnable, 3500);             }         });     } } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -