android-theme

Full Screen in customize theme

懵懂的女人 提交于 2019-11-30 13:08:39
问题 I need my app to show as full screen. Now I know how to add this feature into the application tag in Mainfest using android:theme=”@android:style/Theme.NoTitleBar.Fullscreen" However, I have my own theme called "CodeFont", and I cannot use two themes in the same application. How I can add this feature into my own style tag in my resources file? There is no such things as an android:style tag. 回答1: Create your custom theme by using default theme, like this window with Fullscreen <style name=

How to change default color in all texts in my Android application?

天涯浪子 提交于 2019-11-30 12:50:33
问题 I would like to change all color texts in my application. So I wrote this code and I set my theme in the manifest: <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <item name="android:textColor">@color/white</item> </style> But only TextView texts are in white. I would like Button and EditText to be in white too. Can anyone help me? Thank you in advance. 回答1: Your Theme: <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <item name="android

Using the colors for the new Material design theme in Android

青春壹個敷衍的年華 提交于 2019-11-30 12:01:36
问题 I was in the process of designing an Android application and decided to try out the new Material theme. I found all of the available color schemes for the new theme online, but I was unable to find a corresponding .xml file that has all of the colors in the color palette. Does anyone know where I can find this so that I might use these colors in my styles? Here is the color palette: http://www.google.com/design/spec/style/color.html#color-ui-color-application 回答1: I was unable to find an XML

Customizing ActionBar Tabs on Android 4

谁说我不能喝 提交于 2019-11-30 11:28:00
I'm trying to customize Tabs on my ActionBar. I just want to align tabs to phone screen and make it stretchable for various screens. But all I get is this: The code I use for the theme is this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="MyTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item> </style> <style name="MyActionBarTabTextStyle" parent="@android:style/Widget.Holo.Light.Tab"> <item name="android:textSize">14dip</item> <item name="android:padding">0dip</item> </style> </resources> Is it

Remove action bar shadow programmatically

一曲冷凌霜 提交于 2019-11-30 11:13:15
How can i remove the drop shadow of action bar from java code ?. If i remove from the style it is working fine. <style name="MyTheme" parent="Theme.Sherlock"> .... <item name="windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item> .... </style> But i need to remove and add it dynamically from java code. erakitin There is no way to set value for windowContentOverlay attribute programmatically. But you can define two different themes, one for Activities with a visible ActionBar shadow and one for others: <!-- Your main theme with ActionBar shadow. --> <style

No style ViewPagerIndicator in combination with SherlockActionBar

别等时光非礼了梦想. 提交于 2019-11-30 11:01:12
问题 I'm trying to implement the ViewPagerIndicator with SherlockActionBar. It works: I can slide the fragments, but the style doesn't work! It looks like this: related topic: https://github.com/JakeWharton/Android-ViewPagerIndicator/issues/66 I know what's going wrong: In the sample of VPI, the style of a page is set in AndroidManifest.xml by (for example) <activity android:name=".SampleTabsDefault" android:theme="@style/Theme.PageIndicatorDefaults"> </activity> But when I add that android:theme

Get color value programmatically when it's a reference (theme)

雨燕双飞 提交于 2019-11-30 10:14:03
问题 Consider this: styles.xml <style name="BlueTheme" parent="@android:style/Theme.Black.NoTitleBar"> <item name="theme_color">@color/theme_color_blue</item> </style> attrs.xml <attr name="theme_color" format="reference" /> color.xml <color name="theme_color_blue">#ff0071d3</color> So the theme color is referenced by the theme. How can I get the theme_color (reference) programmatically? Normally I would use getResources().getColor() but not in this case because it's referenced! 回答1: This should

Transparent actionBar and statusBar in Android lollipop

我只是一个虾纸丫 提交于 2019-11-30 09:14:49
问题 I am trying to create this interface : And here is my actual result : The status bar is well transparent and we see my image as background : OK The action bar is not transparent : NOK Here is the code of my theme that I use for this activity : <?xml version="1.0" encoding="utf-8"?> <resources> <!-- inherit from the material theme --> <style name="MaterialAppDetailTheme" parent="android:Theme.Material.Light"> <item name="android:statusBarColor">@android:color/transparent</item> <item name=

Android textAllCaps in Theme

纵然是瞬间 提交于 2019-11-30 08:58:27
I have a theme where on wanted all textviews on activities to be capitalized. So I set textAllCaps in a style and then applied it to textViewStyle in my theme like the below <style name="Widget.Apex.TextView" parent="android:Widget.TextView"> <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> <item name="android:textAllCaps">true</item> </style> <style name="MyTheme" parent="@android:style/Theme.Holo"> <item name="android:textViewStyle">@style/Widget.Apex.TextView</item> </style> Unfortunately this had the side effect of turning my Application Title, ActionBar

Error:Attribute “theme” has already been defined

你说的曾经没有我的故事 提交于 2019-11-30 08:06:56
I am using Android studio for building application. I am using this following dependencies: play services : compile 'com.google.android.gms:play-services:5.2.08' app combat v7 : compile 'com.android.support:appcompat-v7:21.0.0' support Cardview : compile 'com.android.support:cardview-v7:21.0.0' support Recycler view : compile 'com.android.support:recyclerview-v7:21.0.0' I am getting following error while building my app: app/build/intermediates/exploded-aar/com.google.android.gms/play-services/5.2.08/res/values/wallet_attrs.xml Error:Attribute "theme" has already been defined Code Styles.xml