android-styles

Android material button taking color primary instead of color accent

跟風遠走 提交于 2021-01-07 01:21:34
问题 I have my layout button as - <com.google.android.material.button.MaterialButton android:id="@+id/save_button" style="@style/buttonView" android:text="Save" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" /> In my styles.xml , I have - <style name="buttonView" parent="Theme.MyTheme"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginStart">16dp</item> <item

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

Android Background Drawable Not Working in Button Since Android Studio 4.1

狂风中的少年 提交于 2020-11-25 03:32:52
问题 I find out that since Android Studio 4.1 I cannot change the background color of a Button by setting color on its android:background , just no effect. And custom Drawable is not working as well. My background Drawable : <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1.5dp" android:color="@android:color/black" /> <solid android:color="@android:color/white" /> <corners android:radius="8dp" /> </shape> My Button : <Button

Android Background Drawable Not Working in Button Since Android Studio 4.1

北战南征 提交于 2020-11-25 03:30:19
问题 I find out that since Android Studio 4.1 I cannot change the background color of a Button by setting color on its android:background , just no effect. And custom Drawable is not working as well. My background Drawable : <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1.5dp" android:color="@android:color/black" /> <solid android:color="@android:color/white" /> <corners android:radius="8dp" /> </shape> My Button : <Button

Android Background Drawable Not Working in Button Since Android Studio 4.1

雨燕双飞 提交于 2020-11-25 03:29:38
问题 I find out that since Android Studio 4.1 I cannot change the background color of a Button by setting color on its android:background , just no effect. And custom Drawable is not working as well. My background Drawable : <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1.5dp" android:color="@android:color/black" /> <solid android:color="@android:color/white" /> <corners android:radius="8dp" /> </shape> My Button : <Button