Permalink
Browse files

theme: update target from v10 to v11; use Theme.Holo{,.Light}

  • Loading branch information...
1 parent 929d1ce commit 106fe53f7d18a1adc5d7c42ad63962a6a53ec667 @talklittle committed Jan 14, 2012
View
@@ -30,7 +30,7 @@
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
- <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="10" />
+ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" />
<supports-screens />
View
@@ -11,4 +11,4 @@
split.density=false
proguard.config=proguard.cfg
# Project target.
-target=android-10
+target=android-11
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright 2009 Andrew Shu
+ *
+ * This file is part of "reddit is fun".
+ *
+ * "reddit is fun" is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * "reddit is fun" is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with "reddit is fun". If not, see <http://www.gnu.org/licenses/>.
+-->
+<resources>
+
+ <style name="Reddit_Light_Medium" parent="@android:style/Theme.Holo.Light">
+ <item name="android:listSelector">@drawable/list_selector_blue</item>
+ <item name="android:cacheColorHint">@color/white</item>
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Medium.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Medium.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Medium.Large</item>
+ </style>
+
+ <style name="Reddit_Dark_Medium" parent="@android:style/Theme.Holo">
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Medium.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Medium.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Medium.Large</item>
+ <item name="android:windowBackground">@color/black</item>
+ </style>
+
+ <style name="Reddit_Light_Large" parent="@android:style/Theme.Holo.Light">
+ <item name="android:listSelector">@drawable/list_selector_blue</item>
+ <item name="android:cacheColorHint">@color/white</item>
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Large.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Large.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Large.Large</item>
+ </style>
+
+ <style name="Reddit_Dark_Large" parent="@android:style/Theme.Holo">
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Large.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Large.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Large.Large</item>
+ <item name="android:windowBackground">@color/black</item>
+ </style>
+
+ <style name="Reddit_Light_Larger" parent="@android:style/Theme.Holo.Light">
+ <item name="android:listSelector">@drawable/list_selector_blue</item>
+ <item name="android:cacheColorHint">@color/white</item>
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Larger.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Larger.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Larger.Large</item>
+ </style>
+
+ <style name="Reddit_Light_Huge" parent="@android:style/Theme.Holo.Light">
+ <item name="android:listSelector">@drawable/list_selector_blue</item>
+ <item name="android:cacheColorHint">@color/white</item>
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Huge.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Huge.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Huge.Large</item>
+ </style>
+
+ <style name="Reddit_Dark_Larger" parent="@android:style/Theme.Holo">
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Larger.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Larger.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Larger.Large</item>
+ <item name="android:windowBackground">@color/black</item>
+ </style>
+
+ <style name="Reddit_Dark_Huge" parent="@android:style/Theme.Holo">
+ <item name="android:textAppearanceSmall">@style/TextAppearance_Huge.Small</item>
+ <item name="android:textAppearanceMedium">@style/TextAppearance_Huge.Medium</item>
+ <item name="android:textAppearanceLarge">@style/TextAppearance_Huge.Large</item>
+ <item name="android:windowBackground">@color/black</item>
+ </style>
+
+ <!-- TextAppearance for different font size settings -->
+ <style name="TextAppearance_Medium.Small" parent="@android:style/TextAppearance.Small">
+ <item name="android:textSize">10sp</item>
+ </style>
+ <style name="TextAppearance_Medium.Medium" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">12sp</item>
+ </style>
+ <style name="TextAppearance_Medium.Large" parent="@android:style/TextAppearance.Large">
+ <item name="android:textSize">14sp</item>
+ </style>
+
+ <style name="TextAppearance_Large.Small" parent="@android:style/TextAppearance.Small">
+ <item name="android:textSize">12sp</item>
+ </style>
+ <style name="TextAppearance_Large.Medium" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">13sp</item>
+ </style>
+ <style name="TextAppearance_Large.Large" parent="@android:style/TextAppearance.Large">
+ <item name="android:textSize">14sp</item>
+ </style>
+
+ <style name="TextAppearance_Larger.Small" parent="@android:style/TextAppearance.Small">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="TextAppearance_Larger.Medium" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">15sp</item>
+ </style>
+ <style name="TextAppearance_Larger.Large" parent="@android:style/TextAppearance.Large">
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="TextAppearance_Huge.Small" parent="@android:style/TextAppearance.Small">
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="TextAppearance_Huge.Medium" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">20sp</item>
+ </style>
+ <style name="TextAppearance_Huge.Large" parent="@android:style/TextAppearance.Large">
+ <item name="android:textSize">22sp</item>
+ </style>
+
+ <style name="NoTitleDialog" parent="@android:style/Theme.Holo.Dialog">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
+</resources>
+
@@ -28,7 +28,9 @@ public void onCreate(Bundle savedInstanceState)
params.width = LayoutParams.FILL_PARENT;
if (display.getOrientation() == Configuration.ORIENTATION_LANDSCAPE)
params.height = LayoutParams.FILL_PARENT;
- getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);
+ getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);
+
+ setCanceledOnTouchOutside(true);
}
}
@@ -29,6 +29,8 @@ public void onCreate(Bundle savedInstanceState)
if (display.getOrientation() == Configuration.ORIENTATION_LANDSCAPE)
params.height = LayoutParams.FILL_PARENT;
getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);
+
+ setCanceledOnTouchOutside(true);
}
}

0 comments on commit 106fe53

Please sign in to comment.