material-design

How to access properties of angular material components?

三世轮回 提交于 2021-02-20 10:13:01
问题 I'm fairly new to angular in general, i have built my first few apps with it and right now I'm working on some project that contains angular material. When i go to this site i see lots of properties of the MatSelect directive. There is one property called 'empty: boolean' that I would like to access in some way, but i don't know how, can you help me? 回答1: Pay attention to Exported as:matSelect . You can reference it by template reference variable(#var) or by ViewChild: <mat-select #matSelect

How to access properties of angular material components?

回眸只為那壹抹淺笑 提交于 2021-02-20 10:12:23
问题 I'm fairly new to angular in general, i have built my first few apps with it and right now I'm working on some project that contains angular material. When i go to this site i see lots of properties of the MatSelect directive. There is one property called 'empty: boolean' that I would like to access in some way, but i don't know how, can you help me? 回答1: Pay attention to Exported as:matSelect . You can reference it by template reference variable(#var) or by ViewChild: <mat-select #matSelect

Adding icon to left of DropDownButton (expanded) in flutter

吃可爱长大的小学妹 提交于 2021-02-18 20:41:05
问题 I want to add icon to left of DropDownButton but can't find a way to do so. What I want to achieve is like this: I have tried following code but it places icon to right where I don't want it and it also overrides arrow icon: `@override Widget build(BuildContext context) { return Scaffold( body: Container( margin: EdgeInsets.only(top: 64.0, left: 16.0, right: 16.0), color: Colors.white, child: DropdownButton( icon: Icon( Icons.person, color: Colors.redAccent, size: 20.09, ), isExpanded: true,

How can I disable Android Lollipop ripple's alpha value?

时光怂恿深爱的人放手 提交于 2021-02-17 21:25:58
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">

How can I disable Android Lollipop ripple's alpha value?

喜欢而已 提交于 2021-02-17 21:25:47
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">

How can I disable Android Lollipop ripple's alpha value?

好久不见. 提交于 2021-02-17 21:25:06
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">

How to disable menu item of bottom navigation view?

﹥>﹥吖頭↗ 提交于 2021-02-17 02:07:42
问题 How can I disable a material design bottom navigation menu item? I can set .isClickable = false but this doesn't show the menu item as disabled, similar to a button. I can't do .isEnabled , the API won't allow it. <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/menu_item_1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom" android:background="@color/colorDark" app:menu="@menu/bottom_navigation_menu">

How to disable menu item of bottom navigation view?

為{幸葍}努か 提交于 2021-02-17 02:07:30
问题 How can I disable a material design bottom navigation menu item? I can set .isClickable = false but this doesn't show the menu item as disabled, similar to a button. I can't do .isEnabled , the API won't allow it. <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/menu_item_1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom" android:background="@color/colorDark" app:menu="@menu/bottom_navigation_menu">

White Space with CardView on pre-lollipop devices

穿精又带淫゛_ 提交于 2021-02-16 12:59:37
问题 I am attempting to add rounding and shadows to some views on an app and am utilizing the card view library to achieve that. It is looking good on lollipop devices but am running into compatibility issues with anything pre-lollipop. I will preface this by saying that I have looked at the answers in the questions below have found that none of them are working for me. Appcompat CardView and Picasso no rounded Corners Cardview - white border around card Unnecessary padding in CardView? The most

Is it possible to set Material ChipGroup orientation to VERTICAL?

試著忘記壹切 提交于 2021-02-15 06:19:58
问题 I'm adding a material ChipGroup dynamically to a parent linear layout which is set to VERTICAL orientation but the chip items seem to be added horizontally. Is there any way to make it lay out the chip items vertically? setLayoutDirection() method of ChipGroup class method doesn't seem to take any parameter that supports VERTICAL orientation. 回答1: you can set width = match_parent in each Chip item <com.google.android.material.chip.ChipGroup android:id="@+id/chipGroup" android:layout_width=