Permalink
Browse files

ui fixes

  • Loading branch information...
1 parent 04425cd commit 75355c1728462a1bc6cc8071a86170f099818e23 @mariotaku committed Nov 27, 2012
View
@@ -41,8 +41,8 @@
<!-- for programmatic instantiation -->
<item name="actionBarBackground">@drawable/bg_actionbar_light_theme</item>
<item name="actionBarTitleStyle">@style/Widget.ActionBarTitle</item>
- <item name="actionBarItemStyle">@style/Widget.ActionBarItem.Light</item>
- <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem.Light</item>
+ <item name="actionBarItemStyle">@style/Widget.ActionBarItem.Light.DarkActionBar</item>
+ <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem.Light.DarkActionBar</item>
<item name="actionBarHomeAsUpIndicator">@drawable/actionbar_back_light</item>
<item name="actionBarIndeterminateProgressStyle">?android:attr/progressBarStyleSmall</item>
@@ -64,6 +64,15 @@
<item name="tabBackground">@drawable/tab_background_dark</item>
<item name="preferenceTitleStyle">@style/TextAppearance.Holo.Light.Medium</item>
<item name="android:galleryItemBackground">@drawable/gallery_item_background</item>
+
+ <!-- for programmatic instantiation -->
+ <item name="actionBarBackground">@drawable/bg_actionbar_light_theme</item>
+ <item name="actionBarTitleStyle">@style/Widget.ActionBarTitle</item>
+ <item name="actionBarItemStyle">@style/Widget.ActionBarItem.Light.DarkActionBar</item>
+ <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem.Light.DarkActionBar</item>
+ <item name="actionBarHomeAsUpIndicator">@drawable/actionbar_back_light</item>
+ <item name="actionBarIndeterminateProgressStyle">?android:attr/progressBarStyleSmall</item>
+
</style>
</resources>
@@ -52,6 +52,10 @@
<item name="android:background">@drawable/actionbar_item_background_holo_light</item>
</style>
+ <style name="Widget.ActionBarItem.Light.DarkActionBar" parent="Widget.ActionBarItem"/>
+
+ <style name="Widget.ActionBarHomeItem.Light.DarkActionBar" parent="Widget.ActionBarHomeItem"/>
+
<style name="Widget.ActionBarTitleBase" parent="android:Widget.TextView">
<item name="android:id">@id/actionbar_title</item>
<!-- layout_width/height/weight must be set in code -->
@@ -28,8 +28,8 @@
<!-- for programmatic instantiation -->
<item name="actionBarBackground">@drawable/actionbar_bg_light_darkactionbar_holo</item>
<item name="actionBarTitleStyle">@style/Widget.ActionBarTitle.Inverse</item>
- <item name="actionBarItemStyle">@style/Widget.ActionBarItem</item>
- <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem</item>
+ <item name="actionBarItemStyle">@style/Widget.ActionBarItem.Light.DarkActionBar</item>
+ <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem.Light.DarkActionBar</item>
<item name="actionBarHomeAsUpIndicator">@drawable/actionbar_back_dark</item>
<item name="actionBarIndeterminateProgressStyle">?android:attr/progressBarStyle</item>
<item name="menuBarBackground">@drawable/actionbar_bg_bottom_light_darkactionbar_holo</item>
@@ -715,6 +715,11 @@ protected int getLightThemeRes() {
}
@Override
+ protected boolean isSetBackgroundEnabled() {
+ return false;
+ }
+
+ @Override
protected void onStart() {
super.onStart();
final String uploader_component = mPreferences.getString(PREFERENCE_KEY_IMAGE_UPLOADER, null);
@@ -856,17 +856,15 @@ public static File getBestCacheDir(final Context context, final String cache_dir
final File ext_cache_dir = GetExternalCacheDirAccessor.getExternalCacheDir(context);
if (ext_cache_dir != null && ext_cache_dir.isDirectory()) {
final File cache_dir = new File(ext_cache_dir, cache_dir_name);
- if (cache_dir.isFile() && cache_dir.delete() || cache_dir.isDirectory() && cache_dir.canRead()
- && cache_dir.canWrite()) return cache_dir;
+ if (cache_dir.isDirectory() || cache_dir.mkdirs()) return cache_dir;
}
} else {
final File ext_storage_dir = Environment.getExternalStorageDirectory();
if (ext_storage_dir != null && ext_storage_dir.isDirectory()) {
final String ext_cache_path = ext_storage_dir.getAbsolutePath() + "/Android/data/"
+ context.getPackageName() + "/cache/";
final File cache_dir = new File(ext_cache_path, cache_dir_name);
- if (cache_dir.isFile() && cache_dir.delete() || cache_dir.isDirectory() && cache_dir.canRead()
- && cache_dir.canWrite()) return cache_dir;
+ if (cache_dir.isDirectory() || cache_dir.mkdirs()) return cache_dir;
}
}
return new File(context.getCacheDir(), cache_dir_name);

0 comments on commit 75355c1

Please sign in to comment.