android-theme

Transparent actionBar and statusBar in Android lollipop

戏子无情 提交于 2019-11-29 13:55:44
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:windowActionBarOverlay">true</item> <!-- enable window content transitions --> <item name="android

Dynamically find the theme name in Android application

旧时模样 提交于 2019-11-29 11:24:37
I have a tablet application which I am rebranding so there are multiple themes, based on the type of user. I'd like to find the name of the theme that is currently being applied, and based on that theme then I can do some back-end functionality changes. I have to dynamically set some image resources, which is fine as long as I pass in the correct theme resource (the R.style.redtheme), but I'd like to set this dynamically. TypedArray a = getTheme().obtainStyledAttributes(R.style.redtheme, new int[] {aTabResource.mDrawableAttrId}); To do the styling I'm creating custom attributes and then

Error:Attribute “theme” has already been defined

删除回忆录丶 提交于 2019-11-29 11:02:54
问题 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

How to customize TimePicker in material design android?

放肆的年华 提交于 2019-11-29 08:54:04
问题 I am unable to change the selector color and other parts of the TimePicker. So far, I can change header color and background but I am unable to change the innercircle and the textcolor. Change custom theme link. My code : <TimePicker android:id="@+id/tp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:timePickerMode="clock" android:headerBackground="#565466" android:amPmBackgroundColor="#500126" android:numbersBackgroundColor="#57e326" android:numbersTextColor

Custom ListView in Fragment not adhering to parent theme

北城以北 提交于 2019-11-29 08:02:19
I'm currently having an issue with using custom ListView adapters with the Holo.Light theme. Within the activities and fragments, any TextViews are displayed in the theme's normal colours ( textColorPrimary ). However, any text within the custom ListAdapter uses textColorPrimary from the default Holo theme, effectively making the text unreadable. Here is an example from my app's main menu: list_main_menu.xml - The row layout for the ListAdapter <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/container" android

How to style ActionaBar Tab text in Android?

落爺英雄遲暮 提交于 2019-11-29 07:07:40
I am using ActionBarShrelock to provide Action Bars for pre honeycomb devices. I have following code in my themes.xml file... <style name="My.Tab.Style" parent="@android:style/Widget.TabWidget"> <item name="android:textAppearance">@style/MyCustomTabTextStyle</item> </style> <style name="MyCustomTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText"> <item name="android:textAppearance">@android:style/TextAppearance.Medium</item> <item name="android:textSize">14sp</item> <item name="android:textStyle">bold</item> <item name="android:textColor">@color/tabbar_text_color</item> </style> Than I

How to use the new DayNight Theme?

五迷三道 提交于 2019-11-29 06:57:05
问题 Starting to get my hands into that new update to the Google Support Library and I want to implement the Theme.AppCompat.DayNight into my app. The problem I am having is that it seems no one explained how to customize it. So If I want to have a different colorAccent for day and a different one for night, how do I do that? Are you supposed to specify different dark and light themes to base off of? Thanks in advance! 回答1: You can use the night resource qualifier folder. In this way you can

How to Change the Text Selection Toolbar color which comes when we copy a text?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 05:56:41
I am developing an application and i set "android:textIsSelectable" for the TextViews. But my material theme is not matching with the TextSelection appBar. Is there a way by which i can change the color of that appBar ?? Attached the Image Below Check it :- Assuming you use the appcompat-v7 library add these to your theme:¨ <!-- this makes sure the action mode is painted over not above the action bar --> <item name="windowActionModeOverlay">true</item> <item name="actionModeBackground">@drawable/myapp_action_mode_background</item> Now I wasn't able to style the insides of the action mode (text

Define TabLayout style in theme

笑着哭i 提交于 2019-11-29 05:56:10
I have two different styles of TabLayout in my app: <style name="TabLayoutPower" parent="Widget.Design.TabLayout"> <item name="tabSelectedTextColor">@android:color/white</item> <item name="tabTextColor">@android:color/white</item> </style> <style name="TabLayoutFree" parent="Widget.Design.TabLayout"> <item name="tabSelectedTextColor">@android:color/black</item> <item name="tabTextColor">@android:color/black</item> </style> How can I define the default TabLayout style for a theme? I cannot find any info which item name should I use to build my theme. I'd like to add the TabLayout the same way I

EditText how to activate copy/paste popup without any actionbar?

天大地大妈咪最大 提交于 2019-11-29 05:35:31
I m under delphi and i use the android framework to create an edit. When i set the theme to Theme.DeviceDefault.Light.NoActionBar then i can select some text in my EditText and i have a popup with "select all/cut/copy/paste/etc" like you can see on the picture below. However, when i select Theme.Material.Light.NoActionBar or Theme.Holo.Light.NoActionBar then i can't select any text in my EditText (i have no right or left text selection handles) and off course i don't have any copy/paste popup Is their any way to have this copy/paste popup on Theme_Material_Light_NoActionBar ? Theme