1

I am developing an application for tablet only, where the requirement is to run the app on the full screen of the tablet.

So please help me how to hide the tab bar because that apps is totally related to examination. So back press, home and and other buttons are not required..

Brajendra Pandey
  • 2,280
  • 1
  • 16
  • 22
  • Examination? What is that? You can also make the icons less visible, just like when you're watching a movie. Would that suit your need? – Stephan Branczyk May 28 '13 at 06:15

3 Answers3

1

You cant hide that. How should a user quit your app without the bottom bar?

danijoo
  • 2,823
  • 4
  • 23
  • 43
  • @Brajendra Pandey Think about this "bottom bar" as a substitution for "physical buttons bar", as some device will a physical bar with physical buttons. I guess you wouldn't be motivated to remove them in that case... ;) – Snicolas May 28 '13 at 05:45
1

You can hide the bottom bar. But there is no direct method available. First you need to root the tab and then run the process to hide the bar. If you root the tab then the warranty will be void. And there is no unique method to root the tab (getting super user privileges), different tabs have different methods. And once you have rooted the tab, then you should do

//hide status bar

process = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 79 s16 com.android.systemui"});
process.waitFor();

//show status bar

process = Runtime.getRuntime().exec(new String[]{"am","startservice","-n","com.android.systemui/.SystemUIService"});
process.waitFor();

But this will work only for HoneyComb. For ICS and above try to find the code to hide status bar.

kumar
  • 691
  • 1
  • 7
  • 16
0

You can try below approach.

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);
    }
}

Or you can do it via your AndroidManifest.xml file:

<activity android:name=".ActivityName"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
chaitanya
  • 1,726
  • 2
  • 17
  • 13