material-design

How to get the Google Now searchbar into my app?

只谈情不闲聊 提交于 2019-12-03 00:30:53
Google has just implemented their searchbar from Google Now into the play store application as you can see in the gif below. How can I implement this actionbar searchbar into my own app? I'd like to have the style hamburger animation acess from toolbar button microphone button ripple effect on lollipop devices What I already have is the layout for a list item the "old" searchview inside the actionbar Any ideas? thanks in advance I created this library to do this, the only thing it does not do is the ripples, but I expect you could implement them quite easily with other resources: https:/

How to use <md-icon> in Angular Material?

旧街凉风 提交于 2019-12-03 00:10:33
问题 I was wondering how to use Material's icons, as this is not working: <material-icon icon = "/img/icons/ic_access_time_24px.svg"> </material-icon> I guess there is a problem with the path given as parameter to the the icon attribute. I would like to know where this icon folder actually is? 回答1: As the other answers didn't address my concern I decided to write my own answer. The path given in the icon attribute of the md-icon directive is the URL of a .png or .svg file lying somewhere in your

AppCompat v22.1.0 not theming all xml widgets correctly for fragments

天大地大妈咪最大 提交于 2019-12-03 00:07:24
When using xml based layouts using AppCompat 22.1.0 not all supported widgets are tinted or material themed for my Fragments using Android 4.4. I see this behavior with the following widgets (others not tested): RadioButton (No tint color) CheckBox (No tint color) Spinner (Device default theme is applied) EditText (Device default theme is applied) RatingBar (Device default theme is applied) Button (Device default theme is applied) It used to work in AppCompat v22.0.0. Screenshot (left 4.4, right 5.0): MainActivity.java: public class MainActivity extends AppCompatActivity { @Override protected

Background image dimension for Navigation Drawer header

 ̄綄美尐妖づ 提交于 2019-12-02 23:22:35
Basically I liked the background used by Mr. Jonathan Lee for Navigation Drawer header back ground in google official link http://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-content So I wanted to reproduce something similar inspired by that. I believe that I need to make a similar design in photoshop and set it as the background image. But the question is, what should be the dimensions and pixels so that it matches different kind of devices? The above link has guidelines for icons and margins, but I haven't seen any dimensions mentioned for that background.

how can I change the color of Toast depends on message type in Angular material $mdToast?

情到浓时终转凉″ 提交于 2019-12-02 23:15:41
While using $mdToast.simple().content("some test") it is showing the toast with black color. how can I change that color to red, yellow and so, depends on the type of the error messages like error, warning and success. Similar question as this . error1337 EDIT: For a correct implementation, please use rlay3s solution below :)! OUTDATED: I had problems displaying custom text with jhblacklocks solution, so I decided to do it like this using 'template': var displayToast = function(type, msg) { $mdToast.show({ template: '<md-toast class="md-toast ' + type +'">' + msg + '</md-toast>', hideDelay:

hide/show fab with scale animation

做~自己de王妃 提交于 2019-12-02 23:03:34
I'm using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here floating action button behaviour Is there any way to do this ? You can use these scale animations for fab button, it gives same effect like design lib fab button. scale_up.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <scale android:duration="100" android:fromXScale="0" android:fromYScale="0" android:pivotX="85%" android:pivotY="85%" android:toXScale="1.0" android:toYScale="1.0" /> </set> scale_down.xml <?xml version="1.0"

how to write css for a specific breakpoint in angular material

蓝咒 提交于 2019-12-02 22:48:29
I am trying to write CSS for a div, that should apply only when a particular breakpoint is hit, eg. sm, md or lg. I'm using angular-material ( https://material.angularjs.org ). I know that this can be done using media queries @media (max-width: 480px) { ... } but i'm looking for a angular-material way of doing this. I'm using the $mdMedia service for that, see: https://material.angularjs.org/latest/#/api/material.core/service/ $mdMedia Additionally you can use it in a template directly e.g. with an ng-class directive: // In your controller: $scope.$mdMedia = $mdMedia; // In your template: <div

How to implement Search Bar like gmail app in android? [closed]

﹥>﹥吖頭↗ 提交于 2019-12-02 22:13:04
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I am trying to implement the Search functionality in my android app similar to latest gmail app (search icon in the action bar). On tapping the Search icon, the action bar turns into a search field with a back button on the left side, and a microphone button on the right side. I want to have the same component in my app. Is there any library or tutorial for this? Is this possible to support this type of material design

Anchor a RecyclerView little higher on a Collapsing Toolbar Layout [duplicate]

让人想犯罪 __ 提交于 2019-12-02 21:59:48
This question already has answers here : Overlap scrolling view with AppBarLayout (2 answers) Is it possible to anchor a RecyclerView a little bit higher than it's usual location, Like the FAB icon on most of the collapsible views (see Image 1 for the expected results). Image 1 I tried the following code but it doesn't give the expected result (see Image 2 for the current result) <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width=

Material Design checklist: hiding app bar on scroll?

陌路散爱 提交于 2019-12-02 21:03:38
Per the new Android Material Design checklist: http://android-developers.blogspot.com/2014/10/material-design-on-android-checklist.html Where appropriate, upon scrolling down, the app bar can scroll off the screen, leaving more vertical space for content. Upon scrolling back up, the app bar should be shown again. I realize there are lots of questions/answers to implement this behavior for the ICS-style app bar, but I'm curious if the new Toolbar widget or Lollipop/AppCompat 21 have introduced a more standard way of achieving this effect. Per Roman Nurik on Google+ (essentially what @tyczj