material-design

Material Components - Text Field - IOS

十年热恋 提交于 2020-04-10 00:25:14
问题 I'm newbie to swift programming, i need to design the login page with floating placeholder input. I have installed the MDCTextInput using POD. added import import MaterialComponents.MaterialTextFields and in viewDidLoad() below code added, companyID.placeholder = "Company ID" companyID.placeholderLabel.highlightedTextColor = UIColor.white companyID.placeholderLabel.textColor = UIColor.white companyID.underline?.color = UIColor.white companyID.delegate = self i have followed the steps given in

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

≯℡__Kan透↙ 提交于 2020-04-09 08:53:35
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

允我心安 提交于 2020-04-09 08:49:01
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

安稳与你 提交于 2020-04-09 08:48:28
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

房东的猫 提交于 2020-04-09 08:42:51
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

How to get boolean from custom boolean attribute for current theme?

我的未来我决定 提交于 2020-03-25 19:27:11
问题 I am setting custom attribute with Boolean format in my theme. <attr name="isCompound" format="boolean" /> When I am trying to retrieve this attribute in my code using following TypedValue typedValue = new TypedValue(); getTheme().resolveAttribute(R.attr.isCompound, typedValue, true); if(typedValue.data) { ... } I get error that typedValue.data (int) can not be converted to Boolean. My question is how do I get Boolean value isCompound from the current theme? 回答1: Thanks to @Mike M. for the

How to get boolean from custom boolean attribute for current theme?

依然范特西╮ 提交于 2020-03-25 19:27:04
问题 I am setting custom attribute with Boolean format in my theme. <attr name="isCompound" format="boolean" /> When I am trying to retrieve this attribute in my code using following TypedValue typedValue = new TypedValue(); getTheme().resolveAttribute(R.attr.isCompound, typedValue, true); if(typedValue.data) { ... } I get error that typedValue.data (int) can not be converted to Boolean. My question is how do I get Boolean value isCompound from the current theme? 回答1: Thanks to @Mike M. for the

Open Angular Material Menu Programmatically using ViewChild on MatMenuTrigger

天大地大妈咪最大 提交于 2020-03-23 07:09:31
问题 How can an Angular Material menu be opened programmatically using Template Reference Variable on button trigger, which is accessed in component using ViewChild? The menu opens normally on click, but I'd like to open it programmatically on mouseover. (mouseover) event handler gives error: Cannot read property 'openMenu' of undefined. So why is clickHoverMenuTrigger undefined in the component? Here's the component html <button mat-icon-button [matMenuTriggerFor]="clickHoverMenu"

How To Increase the height of MDCTextInputControllerOutlinedTextArea

北慕城南 提交于 2020-03-23 05:14:27
问题 I have assigned a class named MDCMultilineTextField for Uiview from the storyboard. This class is used for Multiline TextView. My Uiview height is 400(not fix) but my UiView border is not same as height, Please verify my code and you can see screenshot below. import MaterialComponents @IBOutlet var viewTextView: MDCMultilineTextField! @IBOutlet var btnDone: UIButton! var notes="" var dismissView: ((_ text:String) -> Void)? var desc: MDCTextInputControllerOutlinedTextArea? override func

Transition an SVG Filter

北战南征 提交于 2020-03-18 04:35:06
问题 I'm trying to create a material design like shadow on an SVG circle. I want this shadow to grow with a nice transition when you click on the circle, but at the moment I'm struggling to even figure out if it's possible to animate this transition, so I'm hoping someone might be able to help. I've added a small example of what I've got so far, a circle with a dropshadow which changes on mouseover. I spent quite a while trying to do the dropshadow in CSS but came to the conclusion that I don't