material-design

What does TranslationZ actually do in Android?

和自甴很熟 提交于 2019-12-05 02:29:16
Hi I am developing android application in which I am trying to implement new material design features. I tried to apply both elevation property and TranslationZ property but it is not working. <Button android:id="@+id/button1" style="@style/ButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:text="Name" /> <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#0073ff" /> <corners android:radius="16dp" /> </shape> <style name=

How to implement WhatsApp like material design SearchView?

﹥>﹥吖頭↗ 提交于 2019-12-05 02:08:02
问题 WhatsApp has such Toolbar: When 'Search' menu item clicked, from the top SearchView comes down which takes whole space of toolbar: When I tried to implement SearchView, it looks like this: I found some libraries to implement this: Android Material SearchView by Eugene Horan and MaterialSearchView by krishnakapil. But they are not like in WhatsApp. This question may seem weird, I could not find the way how to do this. So my question is how to implement WhatsApp like material design SearchView

How to use paper-dialog polymer element?

折月煮酒 提交于 2019-12-05 02:05:21
I am using the element by adding opening and closing tags <paper-dialog><p>This is it</p></paper-dialog> but it is not getting shown up. Do I need to add some script on top of it so that it should be triggered on some event? Or is there some another way to make it visible ? atomikolex The dialog itself is autohidden. You usually toggle it with a button. For example, give the dialog an id="dialog" and make the button on-tap="toggleDialog" , which would be toggleDialog: () => { this.$.dialog.toggle(); }, Karthik <base href="https://polygit.org/polymer+polymer+v1.11.2/components/" /> <script src=

Is there any way to do a Material-style shadow in API < 21 (5.0 Lollipop)?

孤者浪人 提交于 2019-12-05 01:56:03
Material design makes a huge emphasis on the metaphor of "sheets of paper". To make these, shadows are essential. Since Material design is a philosophy and not an API (despite it being built into L), this should be done anywhere (Windows Forms, HTML/CSS, etc.). How do I do this in Android API 14 to 20? Note that premade PNGs won't really be that practical for circular and other non-square shapes. If you're not worried about backwards compatibility past Lollipop, you can set the elevation Attribute directly in the XML android:elevation="10dp" Otherwise you have to set it in Java using the

CoordinatorLayout not working

两盒软妹~` 提交于 2019-12-05 01:31:15
I am attempting to implement a CoordinatorLayout from the newly announced Android Design Support Library and I have used the following code in my XML layout as per the sample here : <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android

customize Bounding box stroke in TextInputLayout.OutlinedBox

痴心易碎 提交于 2019-12-05 00:51:37
问题 I'm trying to change box Stroke Color of com.google.android.material.textfield.TextInputLayout while not focused but there is no attribute for that this is my TextInputLayout code <com.google.android.material.textfield.TextInputLayout style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="36dp" android:layout_marginTop="38dp" android:layout_marginEnd="36dp" android:textColorHint=

How do I add elevation (shadow) to my BottomNavigationView. It doesn't come by default

爷,独闯天下 提交于 2019-12-05 00:38:25
I tried setting elevation from xml and programmatically both. But nothing works. It only works if you set white as android:background in the BottomNavigationView. This is my code and it's working: <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="@color/white" app:elevation="8dp" app:itemIconTint="@color/bottom_color_state" app:itemTextColor="@color/bottom_color_state" app:layout_constraintBottom_toBottomOf="parent" app:layout

Bootstrap Material Design cdn

僤鯓⒐⒋嵵緔 提交于 2019-12-05 00:17:51
问题 I'd like to use Bootstrap Material design, and the github page says that I can get it from jsdelivr.com. But then the Getting Started page says: Once copied you need to initialize the material javascript by adding the following javascript to your site, $.material.init() The integration page at jsdelivr says to use this: <link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/css/material-wfont.min.css"> <link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.material

How to change the uinavigationbar title's position?

雨燕双飞 提交于 2019-12-05 00:13:23
问题 I've managed to change the navigationbar height by using my own navigationbar, but the title is still centered. I want it to be at the 72px position from the left. override func sizeThatFits(size: CGSize) -> CGSize { return CGSizeMake(UIScreen.mainScreen().bounds.width, 56) } I used this to change the height but I didn't find a way to change the position of all the items. I tried to set the frame but I can't. I can't change the position of the button too. i wanna look like this 回答1: Create a

How to set elevation to Bottom navigation

不羁的心 提交于 2019-12-05 00:05:24
So by the support V25 . We have new component called Bottom navigation. Follow the Design guidelines, the Bottom Navigation's elevation should be 8dp ( https://material.io/guidelines/components/bottom-navigation.html#bottom-navigation-specs ) But I can't set the elevation to it. Any suggestion, example would be appreciated. Thank you! UPDATE XML CODE <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap