mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-27 04:33:00 +08:00
Adding the TitleBar pull request
This commit is contained in:
commit
dde79c14f5
@ -256,9 +256,17 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
LOG.d(TAG, "DroidGap.onCreate()");
|
LOG.d(TAG, "DroidGap.onCreate()");
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
if (!preferences.prefMatches("showTitle", "true")) {
|
||||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
|
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||||
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
}
|
||||||
|
|
||||||
|
if (preferences.prefMatches("fullscreen","true")) {
|
||||||
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||||
|
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
|
} else {
|
||||||
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
|
||||||
|
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
// This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket!
|
// This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket!
|
||||||
Display display = getWindowManager().getDefaultDisplay();
|
Display display = getWindowManager().getDefaultDisplay();
|
||||||
|
Loading…
Reference in New Issue
Block a user