android-styles

Style applied to an AlertDialog not working correctly

夙愿已清 提交于 2020-06-23 03:44:33
问题 I've been asked to match the look of an Alert Dialog in our app to the one used by the app's theme. I managed to apply a style to all Alert Dialogs in the app using it as part of the app's theme, but there are situations where the style is not applying correctly. It happens for example when the Alert Dialog contains a 'Single Choice List' as its' message. The title looks fine, so is the background and the button bar, but the list itself is problematic. At first, the radio buttons as well as

Style applied to an AlertDialog not working correctly

橙三吉。 提交于 2020-06-23 03:41:14
问题 I've been asked to match the look of an Alert Dialog in our app to the one used by the app's theme. I managed to apply a style to all Alert Dialogs in the app using it as part of the app's theme, but there are situations where the style is not applying correctly. It happens for example when the Alert Dialog contains a 'Single Choice List' as its' message. The title looks fine, so is the background and the button bar, but the list itself is problematic. At first, the radio buttons as well as

Remove android.widget.Toolbar shadow

自作多情 提交于 2020-06-07 10:06:17
问题 Using API21+ Toolbar : // Toolbar Toolbar toolbar = new Toolbar(this); toolbar.showOverflowMenu(); Would like to remove its shadow completely. setElevation(0) doesn't do anything since getElevation() already returns 0 . There is Material Design reference: https://material.io/guidelines/layout/structure.html#structure-toolbars There is Develop Reference: https://developer.android.com/reference/android/widget/Toolbar.html But I don't see any info related to the shadow. Toolbar Question: how to

How to use specified weights for fonts in XML

南楼画角 提交于 2020-05-24 08:09:07
问题 Using the Fonts in XML feature you can specify various font weights for a font family. For example: <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <font android:font="@font/archivo_narrow_regular" android:fontWeight="400" android:fontStyle="normal" app:font="@font/archivo_narrow_regular" app:fontWeight="400" app:fontStyle="normal"/> <font android:font="@font/archivo_narrow