android-theme

ListView doesn't get styled with theme when using custom adapter

六月ゝ 毕业季﹏ 提交于 2021-01-28 18:00:32
问题 I have minidemo with three fragments. One displays two TextView and an editview directly, the next treat the same layout as rows in a list with custom adapter, the third displays a plain list with standard adapter (simple_list_item_1) The activity uses a standard theme ( Theme.AppCompat.Light.DarkActionBar ), which I have not modified. I would have expected all three blocks to be styled similarly. Instead, the second block with the custom adapter does not seem to get styled according to the

startActivityForResult should be used error only in dark mode

大憨熊 提交于 2021-01-28 11:20:54
问题 I am implementing dark mode on my app, and I am facing a peculiar(to me) problem. Below is the logcat of the crash, which I am facing only in dark mode , no error/warning in Light/Default (I am in SDK<=29 , so my default is battery saver) mode. Even when battery saver is on, i.e. the app is essentially in dark mode, this crash does not occur. Log of the error: 2020-02-20 11:20:59.726 16666-16666/com.example.trial E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.trial, PID: 16666

Dark Theme in android 9.0 changes my app layouts ugly

こ雲淡風輕ζ 提交于 2021-01-27 13:48:55
问题 I am just designing my layout without expecting any of the problems, but one-day android 9.0 launched and I brought the phone and installed my app in it and tried my app opening it with night mode ON and I started to see white color layout changes in dark and my minds goes block. I want to know how to disable the theme. I tried changing themes, changing the background colors none of those works <RelativeLayout android:layout_width="190dp" android:layout_height="200dp" android:layout_marginTop

layout_width and layout_height is not applying to edittext from the theme

假如想象 提交于 2021-01-27 05:28:27
问题 Below i have added EditText style in theme. I have added width and height also. So i removed android:layout_width and android:layout_height from my edittext view. But it is saying error. If i add width and height it is working fine. What is the difference. Is theme is not applying to my edittext view? <style name="AppTheme" parent="AppBaseTheme"> <!-- All customizations that are NOT specific to a particular API-level can go here. --> <item name="android:editTextStyle">@style/custom

layout_width and layout_height is not applying to edittext from the theme

坚强是说给别人听的谎言 提交于 2021-01-27 05:26:26
问题 Below i have added EditText style in theme. I have added width and height also. So i removed android:layout_width and android:layout_height from my edittext view. But it is saying error. If i add width and height it is working fine. What is the difference. Is theme is not applying to my edittext view? <style name="AppTheme" parent="AppBaseTheme"> <!-- All customizations that are NOT specific to a particular API-level can go here. --> <item name="android:editTextStyle">@style/custom

layout_width and layout_height is not applying to edittext from the theme

天大地大妈咪最大 提交于 2021-01-27 05:25:22
问题 Below i have added EditText style in theme. I have added width and height also. So i removed android:layout_width and android:layout_height from my edittext view. But it is saying error. If i add width and height it is working fine. What is the difference. Is theme is not applying to my edittext view? <style name="AppTheme" parent="AppBaseTheme"> <!-- All customizations that are NOT specific to a particular API-level can go here. --> <item name="android:editTextStyle">@style/custom

How to apply shapeAppreanace in EditText and TextView using Material Design in Android

时光怂恿深爱的人放手 提交于 2020-11-29 08:46:53
问题 I want to design a TextView and EditText with round corner. There is one straight forward solution for this. Using custom shape background. But since material design 1.1.0 introduces shapeAppearance theme attribute to apply a different shape to the corner which works fine for all Material components like MaterialButton , BottomSheet , MaterialCardView , etc. But it does not work for EditText and TextView . I tried using MaterialTextView as well but it did not work. This how I am setting up

How to apply shapeAppreanace in EditText and TextView using Material Design in Android

二次信任 提交于 2020-11-29 08:46:04
问题 I want to design a TextView and EditText with round corner. There is one straight forward solution for this. Using custom shape background. But since material design 1.1.0 introduces shapeAppearance theme attribute to apply a different shape to the corner which works fine for all Material components like MaterialButton , BottomSheet , MaterialCardView , etc. But it does not work for EditText and TextView . I tried using MaterialTextView as well but it did not work. This how I am setting up

How to avoid forced dark theme in my app when devices can force it at app level?

落花浮王杯 提交于 2020-11-28 02:49:39
问题 Some devices, like Poco F2 Pro , can force dark theme in apps that are not compatible with dark theme. For example, my app has this theme and is not compatible with dark theme: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> This is my manifest application part, no dark theme enabled: <application android:name=".helpers.CustomApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android