Can any one please tell me any way to hide status bar completely just for my application on all activities. My application only runs on android tabs with 4.0.3 Android. I actually want to remove the back, home and all the other click listeners on the status bar or just completely hide it. The requirement behind this is that if once my application starts on a tab it stays on until user switches off the device device and there should not be any exit point. I will be grateful for your humble response. I have added android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" manifest.xml.Still not able to disable the status bar. My activity class is given below
package com.plugin.myapp;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaWebViewClient;
import org.apache.cordova.DroidGap;
import org.apache.cordova.CordovaChromeClient;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
public class MainActivity extends DroidGap {
private static MainActivity instance;
// private WebView mWebView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();
//getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
super.loadUrl("file:///android_asset/www/tdc_tutorial.html");
}
// handler for the background updating
Handler progressHandler = new Handler()
{
public void handleMessage(Message msg)
{
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
};
@Override
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
System.out.println("onConfigurationChanged");
}
@Override
public void init() {
super.init((CordovaWebView) new WebView(this), new GWTCordovaWebViewClient(this), new CordovaChromeClient(this));
}
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
//super.onBackPressed();
}
/* (non-Javadoc)
* @see org.apache.cordova.DroidGap#onConfigurationChanged(android.content.res.Configuration)
*/
}
and my manifest.xml is given below
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.plugin.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<application
android:icon="@drawable/ic_launcher"
android:label="Android Test"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:screenOrientation="sensorLandscape"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>