android-theme

ActionBarSherlock doesn't support light-theme alert dialogs?

天涯浪子 提交于 2019-11-30 23:52:15
Well as the title says, i'm using the actionBarSherlock library and a light theme, and sometimes I need to show a dialog using the alertDialog.Builder class. Thing is, no matter what I try, the theme doesn't apply to the dialog itself. The theme should work on both new APIs and old ones (prior to honeycomb). example: code: final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme_LightDialog)); or: final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.Theme_Sherlock_Light_Dialog)); xml: <style

How to change the color of the line in ICS styled EditText

别等时光非礼了梦想. 提交于 2019-11-30 22:29:22
I and using ABS together with theme holo in my application and i get EditText styled as if in ICS. But the line color of the EditText is blue by default and for my design, i need white colored line for the EditText. I tried changing the background, but it is not working. Is there any way so that I can change the color from blue line to white programmatically? Aswathy P Krishnan I found the answer in this link where they are using LayerList I used a layer-list for creating an ICS styled edittext as it was needed only in one place. It works great and no issues found with varying screen

Splash Screen Image for landscape and Portrait using Theme

强颜欢笑 提交于 2019-11-30 20:59:38
问题 I have two full screens splash images, one is for landscape and another is for portrait mode.I want to implemented theses images as splash as per the orientation of the device when app starts. For Example if app starts from landscape mode than landscape image should be displayed as background image and if app starts from portrait mode than portrait image should be displayed as background image I have refer the following Example This is how i setup the Theme : <style name="SplashTheme" parent=

Coloring Android Status Bar in Nav Drawer

杀马特。学长 韩版系。学妹 提交于 2019-11-30 20:16:43
In this app I'm building, I've added a Navigation Drawer fragment into my activity. I'm using 5.0, so I've been able to set the primaryColor and primaryColorDark to get the right colors. I've decided to try and style my Nav Drawer to be very similar to Google Now's drawer in 5.0, where the Nav Drawer has it's own background for the status bar. (Can't post pictures, not enough reputation >.>) I've followed this question's recommendations here , which has helped quite a bit. I've achieved drawing my Nav Drawer under the status bar when I pull it out. Only trouble is, I can't figure out how to

Android AppCompat revision 21 force Holo theme

余生颓废 提交于 2019-11-30 20:06:51
in my project I was using appcompat-v7 (revision 20), and my project was targeting android API level 19 (KitKat), so I could use Holo theme. I accidentally updated "Android Support Library" to revision 21, so I had to change the target in manifest to API level 21 (Lollipop). Because of this, my app's default theme changed to Material (e.g. checkboxes are green). Is there a way to force using Holo theme again? Manifest.xml: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.package" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion

How to change the color of the line in ICS styled EditText

纵然是瞬间 提交于 2019-11-30 18:26:53
问题 I and using ABS together with theme holo in my application and i get EditText styled as if in ICS. But the line color of the EditText is blue by default and for my design, i need white colored line for the EditText. I tried changing the background, but it is not working. Is there any way so that I can change the color from blue line to white programmatically? 回答1: I found the answer in this link where they are using LayerList I used a layer-list for creating an ICS styled edittext as it was

How to Customize AppCompat Material Button Style?

巧了我就是萌 提交于 2019-11-30 17:53:07
I am using the AppCompat theme and I want set the minHeight attribute on my buttons: <style name="Theme.MyTheme" parent="Theme.AppCompat"> <item name="android:buttonStyle">@style/MyButtonStyle</item> </style> <style name="MyButtonStyle" parent="...?"> <item name="android:minHeight">60dp</item> </style> However, there is no Widget.AppCompat.Button style to set as the parent for MyButtonStyle . If I use android:Widget.Button , then all my buttons look like the old crappy style. I tried various other AppCompat themes like TextAppearance.AppCompat.Button , but they do not work. Leaving out a

Unable to change Appcompat theme from light to holo dark

若如初见. 提交于 2019-11-30 17:47:43
I am trying to change the theme of my app completely, This is what I modified & tried : styles.xml in values folder is <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> <style name="AppBaseTheme" parent="android:Theme.Holo"> <!-- Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. --> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <!-- All

Android flavors with different base themes

倾然丶 夕夏残阳落幕 提交于 2019-11-30 17:22:00
问题 I've an android project with multiple flavors that I'm working on. This works fine and I can customize elements of the app such as colors and string resources. I'm wanting to make it so that some of the flavors are based on the AppCompat light theme and some on the AppCompat dark theme. I know I could do this by repeating all the <items> in my style and in each flavor setting the theme to point to each one in a custom manifest for each app but that seems overkill. Is there some easy way to

Create downloadable custom theme and apply it during run time

寵の児 提交于 2019-11-30 13:25:29
问题 I'm making an Android app that needs to allow client to maintain the resources from their server which would include strings, drawables etc. I've already created a mechanism for downloading a zip file with all these files, and they're able to change strings pretty easy, I've also created a mechanism that allows the client to change bg color for UI controls, to change width, height etc but I have a feeling that there must be a better way to create all this. So I believe the real question is: