material-design

Angular Material Design Layout custom sizes

百般思念 提交于 2019-12-13 07:41:14
问题 How to add custom flex attributes for different sizes of the screen? Referring to the spec here : https://material.angularjs.org/latest/#/layout/options For example, the flex attribute flex-gt-lg Sets flex on devices greater than 1200px wide. I want to add one more attribute say something like flex-gt-lgx which sets flex on devices greater than 1600px wide, for which angular material does not provide support. How will do something like this? 回答1: codeMan, You will have to change the CSS in a

How to set the initial value of Flutter autocomplete_textfield

寵の児 提交于 2019-12-13 04:16:25
问题 IN my Flutter app I have an input form that uses a Flutter autocomplete_textfield for one field. When creating new entries the form works fine. However, I need to also be able to use the form to edit records. Loading all other fields on the form from the record to be edited is working, I cannot find how to set the initial value of the autocomplete_textfield. Sid 回答1: You can create controller to you Search Field and use it as: TextEditingController _controller = TextEditingController(); and

Angular material toolbar - Material behavior

僤鯓⒐⒋嵵緔 提交于 2019-12-13 03:47:48
问题 I am using Angular and Angular Material for a project. Since this project's design is based on Material, I am using Angular material for it's components. I have created a toolbar via <mat-toolbar> and a tab list via mat-tab-group . And the page looks as follows: This is all ok. The first tab also contains a list And this is where the problem starts.. The Problem When you normally scroll down the list, according to material design: the top bar should scroll away and the tabs should be on top.

Hidden Floating Action Button popping up in CoordinatorLayout

痞子三分冷 提交于 2019-12-13 02:35:42
问题 I have an Activity with a ViewPager , which displays three different Fragments. Everything is inside a CoordinatorLayout . What I basically did is the same as in this answer: FAB animation with viewpager/tabslider I don't want to have the FAB in the first Fragment , so I set the FAB's visibility to GONE in the layout and show/hide it only when the 2nd Fragment is selected. This part actually works fine. However, when the Activity is first created(or the screen is rotated) the FAB pops up on

How to get an icon to show up next to text in Android Material Buttons?

拥有回忆 提交于 2019-12-13 02:27:09
问题 I'm trying to use the Material Button as developed by google. Due to a third party dependency I cannot use the androidx repository, so I'm currently using the android support library (v28.0.0-alpha1, alpha3 did not allow me to use the material button) I'm trying to achieve this a wide button with centered text + icon next to text: But all I can get is this, centered text with icon on the edge of the button: This is the same as the original android button, which suffered from the same problem.

Customize new TabLayout in support design library

流过昼夜 提交于 2019-12-13 02:04:34
问题 HI i am trying to add image to the new TabLayout introduced in android support design. But it doesn't seems to be working i took some code github and tried to do some little change except for text nothing is workin no icon is showing on tha tab instead of text. Any help is appreciated. List<String> titles = new ArrayList<>(); titles.add("Page One"); titles.add("Page Two"); mTabLayout.addTab(mTabLayout.newTab().setIcon(getResources().getDrawable(R.drawable.ic_launcher))); mTabLayout.addTab

Can the tab selection indicator of TabLayout be pinned to the top of the screen while scrolling?

我的未来我决定 提交于 2019-12-13 01:53:44
问题 I am investigating the way to pin the tab indicator of TabLayout in CoordinatorLayout while scrolling down. If I add scroll|enterAlwaysCollapsed flag to the TabLayout , then the tablayout itself is dissappeared while scrolling down. I want tab indicator bar be pinned to the top of the screen. Is there a way to implement this? 回答1: I think you should just have no flags at all. Your layout should be something like: <CoordinatorLayout> <AppBarLayout> <Toolbar app:layout_scrollFlags="scroll

android UI material style

微笑、不失礼 提交于 2019-12-13 01:28:03
问题 My intention is to do something like this: with a button in the middle of the two views. I followed several instructions, but without success. Currently I have this in my xml And as I said, I try to get something like this: I have done many tests, but can not get the goal. This is the xml I'm using: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/background">

Could not find class 'android.graphics.drawable.RippleDrawable' android studio 2.2.3

梦想与她 提交于 2019-12-12 22:47:23
问题 Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering 回答1: check your themes config. all themes must have a parent from AppCompat. like this: <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:actionMenuTextColor">@android:color/white</item> </style> if you not

Unable run Angular material example in plunker

陌路散爱 提交于 2019-12-12 20:09:39
问题 I created one sample project using Angular Material example in plunker. its worked fine till yesterday today its not working. Even Angular Material example is not working. can you please point me into right direction. I was getting same error as original Angular material plunker error. Error: (SystemJS) Unexpected value 'undefined' exported by the module 'PlunkerMaterialModule' Error: Unexpected value 'undefined' exported by the module 'PlunkerMaterialModule' at d (https://cdnjs.cloudflare