material-components

how can i do a rounded toolbar/actionbar in android studio with code like this in the image? [closed]

大兔子大兔子 提交于 2020-05-30 07:00:01
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago . I'm trying to do this, with code and not with background image 回答1: Define xml file like this (this is how i rounded my botton) put the xml file in drawable folder <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android

What's the difference between the CardView from com.google.android.material and android.support.v7.widget

[亡魂溺海] 提交于 2020-05-25 11:24:03
问题 I'd like to know the difference between both widgets android.support.v7.widget.CardView which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView which is used on Material Design documentation. Are they two libraries that contains the same widget? Which one should I use and how to take this decision? I tried to read more the developers.android documentation, but the docs on developer.android are really big with many version and I'm yet a

What's the difference between the CardView from com.google.android.material and android.support.v7.widget

蹲街弑〆低调 提交于 2020-05-25 11:24:03
问题 I'd like to know the difference between both widgets android.support.v7.widget.CardView which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView which is used on Material Design documentation. Are they two libraries that contains the same widget? Which one should I use and how to take this decision? I tried to read more the developers.android documentation, but the docs on developer.android are really big with many version and I'm yet a

Overriding editTextStyle doesn't work with latest Material Components base style

时间秒杀一切 提交于 2020-05-25 07:41:47
问题 In an app of mine, I'm using the Theme.MaterialComponents.Light.NoActionBar as a base style. In this style, which I call AppTheme , I'm trying to override editTextStyle to provide a custom style for com.google.android.material.textfield.TextInputEditText (according to the source code, it uses R.attr.editTextStyle as a default style). This is my current theme, related to the TIEditText and TILayout: <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> [ primary and

Material Components Default to colorAccent instead of colorPrimary

时光总嘲笑我的痴心妄想 提交于 2020-05-24 03:57:49
问题 My AppTheme in styles.xml looks like this: <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:textColorPrimary">@color/textColorPrimary</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation"

Material Components Default to colorAccent instead of colorPrimary

泪湿孤枕 提交于 2020-05-24 03:56:21
问题 My AppTheme in styles.xml looks like this: <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:textColorPrimary">@color/textColorPrimary</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation"

material checkbox style after customize

落爺英雄遲暮 提交于 2020-05-23 21:05:25
问题 My customized checkbox ( MyCheckbox ) has extended from androidx.appcompat.widget.AppCompatCheckBox , but the default styles don't apply to it. <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> ... <item name="android:checkboxStyle">@style/CheckboxTheme</item> <item name="checkboxStyle">@style/CheckboxTheme</item> </style> <style name="CheckboxTheme" parent="@style/Widget.AppCompat.CompoundButton.CheckBox"> <!-- for example try to change background --> <item name=

material checkbox style after customize

人走茶凉 提交于 2020-05-23 21:05:05
问题 My customized checkbox ( MyCheckbox ) has extended from androidx.appcompat.widget.AppCompatCheckBox , but the default styles don't apply to it. <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> ... <item name="android:checkboxStyle">@style/CheckboxTheme</item> <item name="checkboxStyle">@style/CheckboxTheme</item> </style> <style name="CheckboxTheme" parent="@style/Widget.AppCompat.CompoundButton.CheckBox"> <!-- for example try to change background --> <item name=

OutlinedBox TextInputLayout and gravity center?

烂漫一生 提交于 2020-05-22 07:59:50
问题 How to achieve centered new OutlinedBox style with TextInputLayout ? Current behavior: <android.support.design.widget.TextInputLayout android:id="@+id/textInputLayout2" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="left" > <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="left" android:hint=

Material design components button global theme overriding broken

廉价感情. 提交于 2020-05-15 08:06:08
问题 I want to simply apply styling to all buttons on a theme level like this <style name="BaseTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> ... <item name="buttonStyle">@style/DefaultButton</item> </style> <style name="DefaultButton" parent="Widget.MaterialComponents.Button"> <item name="android:textColor">@color/whatever</item> </style> <Button android:id="@+id/addChannelButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom