android-theme

“Possible overdraw: Root element paints background ”

蹲街弑〆低调 提交于 2019-12-09 02:07:21
问题 While running Android Lint on my Project I came across this warning Possible overdraw: Root element paints background @drawable/main with a theme that also paints a background Where inferred theme is @android:style/Theme.NoTitleBar.Fullscreen Can someone explain to me why is this coming and how to remove it ?? My xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable

Toast throws ArrayIndexOutOfBoundsException with appcompat v26 when using fontFamily attribute in theme

点点圈 提交于 2019-12-09 01:39:49
问题 Whenever I show a Toast , the app crashes. The app works fine if I use older version of AppCompat library or remove fontFamily from the style. onCreate: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toast.makeText(this, "Test", Toast.LENGTH_SHORT).show(); //line 13 } Dependency: compile 'com.android.support:appcompat-v7:26.1.0' AppTheme: <style name="AppTheme" parent="Theme.AppCompat.Light

Change android EditText style from rectangular border to underscore

十年热恋 提交于 2019-12-08 16:41:06
问题 In one of my activities, my EditText views used to look like this But now they looks like this I need help changing it back: from the rectangle to the underscore. BACKGROUND Because I needed to create a custom ActionBar, I had to change the theme of the activity in question, YesterdayActivity , using the following Style: <style name="CustomWindowTitleBackground"> <item name="android:background">#323331</item> </style> <style name="CustomTheme" parent="android:Theme"> <item name="android

Changing the highlight and title color for fragments in PreferenceActivity

倖福魔咒の 提交于 2019-12-08 16:18:14
问题 I'm using the Material theme, and I'd like to change the color of the two marked areas in the image below - i.e. the highlight color (#1) and the color of the title in the details fragment (#2). I know there's an attribute for the color of each somewhere in the theme, but I just can't seem to find it. Any ideas? 回答1: I know there's an attribute for the color of each somewhere in the theme, but I just can't seem to find it. Item number 1 The attribute you'll want is

How to set TextView text color to specific Theme color

风格不统一 提交于 2019-12-08 12:52:53
问题 I try to learn Android Themes and got into trouble setting a TextView TextColor to another color then this global: <item name="android:textColor">@color/white</item> I created this: <item name="chatBubbleTextColor">@color/material_bohemia_500</item> and thought I could use it in the TextView xml like android:textColor="?attr/chatBubbleTextColor" but i cannot get it to work maybe it does not work like that? I know I can do like this: <style name="BohemiachatBubbleTextColor" parent="android

Android, How to theme font colour for just TextView Widgets?

天涯浪子 提交于 2019-12-08 05:26:34
问题 I have just applied a black background image in my theme using <style name="AppBaseTheme" parent="Theme.Sherlock.Light"> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <item name="android:windowBackground">@drawable/background</item> </style> and now I wish to change the colour of just my text views to white so that they are visible against the dark background I thought that setting the android:textColor for TextView would do the trick like so <!--

Define specific view style to use inside theme

徘徊边缘 提交于 2019-12-08 03:13:37
问题 I'd like to add more than one theme for an app, selectable programmatically. How can I define a style for a specific view inside those themes? Let's say I have an ImageView that show a logo in my_layout.xml : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> <ImageView android:layout_width="250dp" android:layout_height="250dp" android:layout_centerHorizontal="true" android:layout

How to change the default color scheme timepicker dialog fragment?

女生的网名这么多〃 提交于 2019-12-07 23:56:31
问题 I am trying to change the default color the timepicker dialog fragment. and right now i have no idea as to what im supposed to be doing. this what i have managed to set my theme to (withouth the actionBar): but this is the dialog i get: this is my xml style file: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light"> <item name="colorPrimary">@color/color_accent</item> <item name="colorPrimaryDark">@color/color_secondary</item> <item name=

WebView resetting UiMode and breaking dark theme

不问归期 提交于 2019-12-07 12:32:12
问题 Our app relies on AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) to make us pick up Light and Dark theme colors from values/colors and values-night/colors But every time we try to use the WebView , it starts by resetting the UiMode and our app gets confused which color values to pick for our themes Some people discussed the issue in detail here and here Anyone out there run into a similar issue? 回答1: Answering my own question, looks like Google fixed the issue https:/

Android numberpicker theme (plus minus buttons)

谁都会走 提交于 2019-12-07 10:23:22
问题 I would like to change the NumberPicker theme, instead of the three value theme (eg: value 10): 9 10 11 I would like to have the plus and the minus button and the numer 10 in the middle. I read this: http://developer.android.com/reference/android/widget/NumberPicker.html I should change only the theme, to obtain what I wish. But how? I can't set the theme in my fragment: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android