android-theme

colorControlNormal not setting toolbar back arrow color

℡╲_俬逩灬. 提交于 2021-02-11 12:50:15
问题 I'm trying to change the color of my toolbar's back arrow to purple, but the color I set for the colorControlNormal attribute of my custom toolbar theme isn't working. The toolbar should be purple but it remains white. I've checked all over my layout's xml and the app Manifest to see if my toolbar theme is being overidden somewhere but i don't see this. What's the problem? styles.xml <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!--

Use Switch button to toggle dayNight theme

北慕城南 提交于 2021-02-08 03:54:22
问题 I have implemented a Switch button in my layout and want to use Android dayNight theme using the button, dayNight theme works okay but the problem is that when ever I click the switch it does not work instantly , i have to change activities and then it works, for example if I click on switch in one activity it will not do anything until i press the back button and move to some other activity and again come back to that activity and also my switch state always set to default when ever I change

Use Switch button to toggle dayNight theme

与世无争的帅哥 提交于 2021-02-08 03:54:08
问题 I have implemented a Switch button in my layout and want to use Android dayNight theme using the button, dayNight theme works okay but the problem is that when ever I click the switch it does not work instantly , i have to change activities and then it works, for example if I click on switch in one activity it will not do anything until i press the back button and move to some other activity and again come back to that activity and also my switch state always set to default when ever I change

Lollipop Progress Bar Tinting

依然范特西╮ 提交于 2021-02-06 07:20:50
问题 I'm on a Lollipop device (MotoG 2014), I read about progress bar tinting, but this is not working...I get the default progress bar color. What am I missing here? <ProgressBar style="?android:attr/progressBarStyleLarge" android:layout_width="50dp" android:layout_height="50dp" android:backgroundTintMode="src_in" android:indeterminate="true" android:indeterminateTint="#f00" /> Many thanks. 回答1: The accepted solution wasn't working for me on pre-Lollipop, but I found this solution to fit all APIs

Lollipop Progress Bar Tinting

喜你入骨 提交于 2021-02-06 07:18:22
问题 I'm on a Lollipop device (MotoG 2014), I read about progress bar tinting, but this is not working...I get the default progress bar color. What am I missing here? <ProgressBar style="?android:attr/progressBarStyleLarge" android:layout_width="50dp" android:layout_height="50dp" android:backgroundTintMode="src_in" android:indeterminate="true" android:indeterminateTint="#f00" /> Many thanks. 回答1: The accepted solution wasn't working for me on pre-Lollipop, but I found this solution to fit all APIs

Android toolbar icon color not so bright

廉价感情. 提交于 2021-02-05 10:40:59
问题 I am developing an app in which there are multiple tabs with icon without any title. The problem is that the icons are not looking as bright it should. I used white color(FFFFFF) in creating icon assets. Still it doesn't looks so good. The pic above shows Facebook Messenger and my App. There is difference between color(although both are white). Any suggestion will be appreciated. 回答1: Yeah I have experienced similar problem. I think it is fault of android asset studio when I create icon with

Android toolbar icon color not so bright

怎甘沉沦 提交于 2021-02-05 10:40:53
问题 I am developing an app in which there are multiple tabs with icon without any title. The problem is that the icons are not looking as bright it should. I used white color(FFFFFF) in creating icon assets. Still it doesn't looks so good. The pic above shows Facebook Messenger and my App. There is difference between color(although both are white). Any suggestion will be appreciated. 回答1: Yeah I have experienced similar problem. I think it is fault of android asset studio when I create icon with

Dark theme not applied correctly, statusbar color unchanged

可紊 提交于 2021-02-05 07:17:46
问题 I am trying to create a light and dark theme for my application. When applying the light theme the statusbar is orange as it should be but as soon as I switch to the dark theme the statusbar stays orange although I want it to be black. I am not a pro in theming so any help is really appreciated. I included some screenshots, so you can see what I mean. Thank you in advance. Edit: I found a solution myself (should somebody else have the same problem), in the beginning of my Loginactivity I

Difference between style.xml and theme.xml android studio?

我与影子孤独终老i 提交于 2021-01-29 04:21:50
问题 Hey I'm trying to change the background of my action bar but I'm not quiet sure I understand the structure of the style files. So basically I have style.xml which is to pass on some elements a desired style. Then I've Theme.xml which is to have a group of styles in it, correct ? How do you link the two in other words how do I tell the theme I want the specified style in it ? I can't manage to change the background of the action bar so here is my code: style.xml: <!-- Base application theme. -

Android style inheritance

别来无恙 提交于 2021-01-28 19:27:46
问题 I have two themes, one has ActionBar and one without. It seems redundant to do duplicate the styles, is there any way to simplify it? Thanks <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary_color</item> <item name="android:windowBackground">@color/bg_color</item> <item name="colorAccent">@color/accent_color</item> <item name="colorPrimaryDark">@color/darker_color</item> <!-- Button style --> <item name="android:buttonStyle