Use pure black background. Bitmap scale must be at least 1.

This commit is contained in:
James Sanford 2012-10-02 19:48:17 -07:00
parent ab5f7bd39a
commit 3f106b9ce0
5 changed files with 22 additions and 1 deletions

View File

@ -11,7 +11,7 @@
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:description="@string/app_description" android:hardwareAccelerated="true">
<activity android:name="KegsMain" android:launchMode="singleInstance" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:windowSoftInputMode="stateAlwaysVisible|adjustPan">
<activity android:name="KegsMain" android:launchMode="singleInstance" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:theme="@style/Theme.BlackBackground">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For API level 11 and later, use a parent of Theme.Holo. -->
<resources>
<style name="Theme.BlackBackground" parent="android:Theme.Holo">
<item name="android:windowBackground">@drawable/screen_background_black</item>
</style>
</resources>

4
res/values/colors.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="screen_background_black">#ff000000</drawable>
</resources>

7
res/values/styles.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.BlackBackground" parent="android:Theme">
<item name="android:windowBackground">@drawable/screen_background_black</item>
</style>
</resources>

View File

@ -85,6 +85,7 @@ class BitmapSize {
// Force integer scaling on X axis.
scaleX = (float)Math.round((width * 0.9) / 640);
scaleX = Math.max(1, scaleX);
// TODO: Fix '48' hack being used for system buttons or soft buttons.
scaleY = Math.min(scaleX, (height - 48) / 400.0f);