material-design

Implementing Gmail Tablet like Navigation Drawer

心不动则不痛 提交于 2019-12-04 07:45:00
问题 I was looking into the tablet design of Gmail application. In that Navigation Drawer implementation is different from others. I have attached image for your reference. And also when I expand the the drawer it should happen like normal navigation drawer behavior. I would like to implement in the same way. I was searching but i found only this link Which is not so helpful. Can anyone give me suggestions how can I do this! 回答1: You can use a SlidingPaneLayout with a margin on the main pane and

No resource found that matches the given name (at 'android:color Primary')

和自甴很熟 提交于 2019-12-04 07:42:46
<resources> <!-- inherit from the material theme --> <style name="AppTheme" parent="android:Theme.Material"> <!-- Main theme colors --> <!-- your app branding color for the app bar --> <item name="android:colorPrimary">@color/primary</item> <!-- darker variant for the status bar and contextual app bars --> <item name="android:colorPrimaryDark">@color/primary_dark</item> <!-- theme UI controls like checkboxes and text fields --> <item name="android:colorAccent">@color/accent</item> </style> </resources> Please try to resolve the problem. android:Theme.Material requires API level 21 and so it's

Android shared elements with Picasso

前提是你 提交于 2019-12-04 07:41:35
I'm trying to make an image transit from a list in one activity to a detail activity. In the detail activity the image is bigger than in the list and I'm using Picasso to retrieve the image from the server. The problem is that the first time I launch the detail activity, the image transit well but is not resized nor centered. When I go back, the image is instantly resized, and if I come back to the same detail activity, it works as expected. The detail activity call method: public static void launch(Activity activity, View transitionView, StoreProduct storeProduct) { ActivityOptionsCompat

How sync TabLayout with ViewPager when using TabItem

孤人 提交于 2019-12-04 06:40:25
I want to use TabLayout with TabItem with following code: <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/color_primary" app:tabGravity="fill" app:tabIndicatorColor="@color/white" app:tabMode="fixed" app:tabSelectedTextColor="@color/white" app:tabTextColor="@color/gray_light"> <android.support.design.widget.TabItem android:layout_width="wrap_content" android:layout_height="match_parent" android:icon="@drawable/ic_language" /> <!-- other tabs ... --> </android.support.design

How to use Chips component from android support library?

雨燕双飞 提交于 2019-12-04 06:39:49
I have read the documentation on the official website . But I was unable to implement Chip in my project following the documentation. Android Studio can't find and import Chip class as well as Chip view. I have also noticed that on Google Developer site there is no reference for Chip class. There are some similar questions. But all answers point to use a third-party library. But I am trying to use Chips component from android support library. The feature is included in support library version 28.0.0-alpha1. To use the feature: In app gradle file: android { compileSdkVersion 'android-P' }

Change Material design theme for Angular 2

只愿长相守 提交于 2019-12-04 06:20:50
I am trying to use Angular Material 2 with my Angular 2 application. I did not found how to change material theme globally ( primaryColor , etc). I know that Angular Material 2 is still in alpha, but is there currently a way to do that? Here's an example of dynamic Angular Material theme implementation as of Angular 5.1 and Angular Material 5.0. (edit) - Currently tested and working in angular 7+ as well. Working editable example - https://stackblitz.com/edit/dynamic-material-theming In theme.scss file, include a default theme(notice it isn't kept under a class name - this is so Angular will

Snackbar with API 21

↘锁芯ラ 提交于 2019-12-04 05:46:17
I'm trying to implement the new Snackbars in my app but I can't. First of all I downloaded the zip file from this SnackBarSampleActivity . I unziped it and then I import it in Eclipse. Now I get an error retrieving parent... for the theme parent in styles.xml . I change it to android:Theme.Light and the error was gone. I right clicked the project and checked isLibrary in Properties/Android, I right clicked my app and in Properties/Android I add the library. Finally I paste the code to show a Snackbar but I get an error because Snackbar cannot be resolved . Please somebody help me! I'm going

Google Maps autoComplete with material design

∥☆過路亽.° 提交于 2019-12-04 05:28:04
I have a question about implementing Google Maps auto complete function in material design: <md-autocomplete flex="" md-no-cache="ctrl.noCache" md-selected-item="ctrl.selectedItem" md-search-text="ctrl.searchText" md-items="item in ctrl.querySearch(ctrl.searchText)" md-item-text="item.display" md-floating-label="Favorite state"> <span md-highlight-text="ctrl.searchText">{{item.display}}</span> </md-autocomplete> Angular Material autocomplete | Google Maps autocomplete How can I use material design's auto complete in google maps auto complete (angular)? Thanks in advance. I've found this

Failed to find target with hash string 'android-P' Install missing platform(s) and sync project

时间秒杀一切 提交于 2019-12-04 05:26:15
问题 Following this android tutorial https://codelabs.developers.google.com/codelabs/mdc-101-java/#1 I'm trying to setup android-p in android studio 3.2 canary version. I have downloaded the following project from github to test material design https://github.com/material-components/material-components-android-codelabs but I get an error when gradle build runs (Failed to find target with hash string 'android-P' Install missing platform(s) and sync project) When I look in the sdk manager I see

Using backdrop on Android

邮差的信 提交于 2019-12-04 05:20:02
https://material.io/design/components/backdrop.html I found this on Material Design, but couldn't find any resources. Thinking about its layout, I think it's made up of any layout with material card view, and I am trying to make my activity file using layout + material card view. Is this method correct to make backdrop layout? Also, I want to know about which layout I should use. Is RelativeLayout can be the way? I don't get it actually. This component (BackDrop) is still under development for the Android Material Components library as of 16 December 2018 . However, if you are using Material