material-design

Angular material design - how to add custom button color?

微笑、不失礼 提交于 2021-01-20 18:51:29
问题 I want to add my own custom colors, similar to "primary", "warn" etc. For example, I added a class for an orange background, but I use it as a class and not as a color attribute. It works, but the code looks a bit confusing. <button md-raised-button color="primary" class="btn-w-md ml-3 orange-500-bg"> <i class="material-icons">description</i> Deactivate </button> What do I need to do to add it as color="orange" ? 回答1: You can change the color of the button only in the normal css way by

Angular material design - how to add custom button color?

孤街醉人 提交于 2021-01-20 18:50:46
问题 I want to add my own custom colors, similar to "primary", "warn" etc. For example, I added a class for an orange background, but I use it as a class and not as a color attribute. It works, but the code looks a bit confusing. <button md-raised-button color="primary" class="btn-w-md ml-3 orange-500-bg"> <i class="material-icons">description</i> Deactivate </button> What do I need to do to add it as color="orange" ? 回答1: You can change the color of the button only in the normal css way by

Dropdown buttons / Spinner like the ones on the design specs from Google

别说谁变了你拦得住时间么 提交于 2021-01-20 16:53:13
问题 I'm wondering how can I do a dropdown button / menu like the ones we can see in the designs specs from Google and in the image bellow, so the list expands bellow right bellow the button. Do I need to set a custom layout for it instead of the R.layout.support_simple_spinner_dropdown_item ? 回答1: Technically it's just a Spinner with custom views and styles. I tried to make one that looks similar to the one you posted, using AppCompat, working with custom drawables and with the view's elevation

Dropdown buttons / Spinner like the ones on the design specs from Google

一世执手 提交于 2021-01-20 16:50:47
问题 I'm wondering how can I do a dropdown button / menu like the ones we can see in the designs specs from Google and in the image bellow, so the list expands bellow right bellow the button. Do I need to set a custom layout for it instead of the R.layout.support_simple_spinner_dropdown_item ? 回答1: Technically it's just a Spinner with custom views and styles. I tried to make one that looks similar to the one you posted, using AppCompat, working with custom drawables and with the view's elevation

Set com.google.android.material.chip.Chip selected color

泪湿孤枕 提交于 2021-01-20 15:28:59
问题 How do I set the selected com.google.android.material.chip.Chip color? I don't want it to be the default gray. This is a single selection chip group. Original documentation here <com.google.android.material.chip.ChipGroup android:id="@+id/chipgroup" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" app:checkedChip="@+id/chip_program" app:chipSpacingHorizontal="32dp" app

Set com.google.android.material.chip.Chip selected color

久未见 提交于 2021-01-20 15:25:51
问题 How do I set the selected com.google.android.material.chip.Chip color? I don't want it to be the default gray. This is a single selection chip group. Original documentation here <com.google.android.material.chip.ChipGroup android:id="@+id/chipgroup" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" app:checkedChip="@+id/chip_program" app:chipSpacingHorizontal="32dp" app

How get data from material-ui TextField, DropDownMenu components?

允我心安 提交于 2021-01-20 14:34:05
问题 I create form, I have several TextField, DropDownMenu material-ui components included, question is how I can collect all data from all TextFields, DropDownMenus in one obj and sent it on server. For TextField it has TextField.getValue() Returns the value of the input. But I can`t understand how to use it. var React = require('react'), mui = require('material-ui'), Paper = mui.Paper, Toolbar = mui.Toolbar, ToolbarGroup = mui.ToolbarGroup, DropDownMenu = mui.DropDownMenu, TextField = mui

TextInputLayout styling

跟風遠走 提交于 2021-01-20 07:28:28
问题 I have problem with my custom TextInputLayout . Here is my code <com.google.android.material.textfield.TextInputLayout android:id="@+id/phone" android:layout_width="0dp" android:layout_height="wrap_content" android:theme="@style/CustomTextInputLayout" android:hint="@string/phone_number" android:layout_marginTop="8dp" android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:startIconDrawable="@drawable/account" android:background="@color/bg_light_gray" app:layout_constraintLeft

How to make TextInputLayout hint asterisk red for required fields

﹥>﹥吖頭↗ 提交于 2021-01-16 08:13:32
问题 Is it possible to make just the asterisk in the hint red when using a TextInputLayout from the design support library? I have seen information on styling the entire hint, but this is a little more complex since only the * should be red, not the whole message. The Material Design example shows this, but the design library doesn't seem to have any option to style it this way using a TextInputLayout and EditText. Reference: https://www.google.com/design/spec/components/text-fields.html#text

How to make TextInputLayout hint asterisk red for required fields

杀马特。学长 韩版系。学妹 提交于 2021-01-16 08:12:05
问题 Is it possible to make just the asterisk in the hint red when using a TextInputLayout from the design support library? I have seen information on styling the entire hint, but this is a little more complex since only the * should be red, not the whole message. The Material Design example shows this, but the design library doesn't seem to have any option to style it this way using a TextInputLayout and EditText. Reference: https://www.google.com/design/spec/components/text-fields.html#text