[android] Use full-screen mode only on Kindle Fire

This commit is contained in:
Alex Zolotarev 2012-02-06 17:46:23 +03:00 committed by Alex Zolotarev
parent db74ea08f6
commit b3d9e4cb03
3 changed files with 9 additions and 2 deletions

View file

@ -26,7 +26,7 @@
android:label="@string/app_name"
android:screenOrientation="behind"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/MWMFullScreen">
android:theme="@style/MWMNoTitle">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MWMFullScreen" parent="@android:style/Theme.NoTitleBar.Fullscreen">
<style name="MWMNoTitle" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowBackground">@color/background_gray</item>
</style>
</resources>

View file

@ -149,6 +149,13 @@ public class MWMActivity extends NvEventQueueActivity implements
@Override
public void onCreate(Bundle savedInstanceState)
{
// Use full-screen on Kindle Fire only
if (android.os.Build.MODEL.equals("Kindle Fire"))
{
getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().clearFlags(android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
}
super.onCreate(savedInstanceState);
m_context = this;