material-design

How to properly style material buttons in android

自古美人都是妖i 提交于 2019-12-04 15:04:40
I am going after flat buttons for my example, but the question really applies to all buttons. Why does it seem so hard to find documentation on the proper way to style material buttons in android. I have the following which I messed around with until I could get it to work. Felt like a hack so I am not sure if this is really the right way to do it. <Button android:id="@+id/apply" style="?android:attr/borderlessButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/md_cyan_A700" android:text="Cancel"/> So I used 'borderlessButtonStyle' to

CoordinatorLayout, FAB and container layout conflict

我们两清 提交于 2019-12-04 14:34:03
I have a main activity with a drawer that have a container layout where I replace each fragment with FragmentManager . I want to add a FAB to one of my child fragments that hide/show on scroll but Im not sure what Im doing wrong and get: Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appBar" android

Material Design: Add circular reveal animation while switching between toolbars

好久不见. 提交于 2019-12-04 14:08:24
问题 I was reading the "Selection" section in material design guidelines (https://material.io/guidelines/patterns/selection.html), and one effect i wanted to add in my app was the circular reveal animation while switching between the app bar and the ActionMode ? An other toolbar ? Here is an example from the guidelines: https://storage.googleapis.com/material-design/publish/material_v_10/assets/0Bwp7jtSjaW36RGF3eUFsRkdqU1U/patterns_selection_item_controlling_desktop_click.webm I didn't found any

Android bottom navigation bar customization

白昼怎懂夜的黑 提交于 2019-12-04 14:02:55
问题 I have successfully implementing simple bottom bar and it looks like picture 1. But I wanted to customize it further so it can looks like the bottom bar in Youtube's android apps, which when you clicked in one of the item, it will spread shadowing effect. My current bottom bar: Youtube's bottom bar I would also like to customize it to look like the one in the official site with some animation when items are clicked. Any snippet or tutorial links would be appreciated. Thanks 回答1: try this

How do I prevent Angular component styling override from carrying over to other components?

我们两清 提交于 2019-12-04 14:01:39
I have a couple Angular components that route back and forth to one another. They both have mat-form-field 's. In one component, I am overriding the styling of the underline component like so: ::ng-deep .mat-input-underline { display: none; } When I click on the link to go back to the other component, the styling as defined as above carries over and the underline components are gone. I tried to add styling like: ::ng-deep .mat-input-underline { display: revert; //or display: unset; //or display: initial; } But none of them work. How can I override the material design styling on just one

Toolbar behind status bar

◇◆丶佛笑我妖孽 提交于 2019-12-04 12:53:43
I had a problem with toolbar and status bar. I change the app styles to AppCompat. My styles are: for values/styles.xml <style name="AppTheme" parent="Theme.AppCompat"> <item name="colorPrimary">@color/color_primario_500</item> <item name="colorPrimaryDark">@color/color_primario_500</item> <item name="android:windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> for values-v21/styles.xml: <style name="AppTheme" parent="AppTheme.BaseGps"> <item name="android:windowContentTransitions">true</item> <item name="android

How to align Material buttons with other UI elements

▼魔方 西西 提交于 2019-12-04 12:52:33
I have trouble to align default material buttons with other elements of the UI. In fact I have looked at the Android source code and the background for the buttons contains insets to be able to draw the shadow and deal with the elevation of the button when clicked: <inset xmlns:android="http://schemas.android.com/apk/res/android" android:insetLeft="@dimen/abc_button_inset_horizontal_material" android:insetTop="@dimen/abc_button_inset_vertical_material" android:insetRight="@dimen/abc_button_inset_horizontal_material" android:insetBottom="@dimen/abc_button_inset_vertical_material"> <shape

Material design Spinner using TextInputLayout.OutlinedBox styling

故事扮演 提交于 2019-12-04 10:58:36
I am currently using Material Design TextInputLayout OutlinedBox as shown below: <android.support.design.widget.TextInputLayout style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.TextInputEditText android:id="@+id/myEditText" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Title" android:inputType="text"/> </android.support.design.widget.TextInputLayout> I am trying to add a dropdown box Spinner under my TextInputEditText, and would

Material Design Lite rendering problems with Angular JS

霸气de小男生 提交于 2019-12-04 10:30:01
I have some problems using Material Design Lite ( getmdl.io ). I followed the steps showed in the getmdl.io web in order to install it (actually I use bower), but I always have the same problem, when I change the ng-route in my web, some resources don't render properly, I need to reload the page to get it properly rendered, for example. First I have this: then when I reload, I get what I want: What I cant understand is why other resources like google icons or buttons work correctly but the menu button on the nav bar and other resources like this one need to reaload the page in order to render

Materialize CSS side-nav not working

喜你入骨 提交于 2019-12-04 10:29:53
问题 I have a basic setup of Materialize running and everything seems to be fine, except for the slide out side-nav. Here's my code. Menu: <ul class="right hide-on-med-and-down"> <li><a class="dropdown-button" data-constrainwidth="false" data-beloworigin="true" data-activates="about-drop" href="#!">About<i class="material-icons left">arrow_drop_down</i></a></li> <li><a class="modal-trigger" href="#signup">Signup</a></li> <li><a class="modal-trigger" href="#sign-in">Sign In</a></li> </ul> <ul id=