material-design

How to change the indentation of sub menu items in a NavigationView?

半城伤御伤魂 提交于 2019-12-10 12:57:16
问题 When we define a NavigationView with a section with sub menu items. It left aligns the sub items with the section title: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="Sub items"> <menu> <item android:title="Sub item 1" /> <item android:title="Sub item 2" /> </menu> </item> </menu> I tried adding a transparent image with the correct size to pad: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="Sub items"> <menu>

Not working Notifydatasetchange on RecyclerView with center selection Horizontal Scrollview?

被刻印的时光 ゝ 提交于 2019-12-10 12:43:13
问题 Auto Scrolling is issue & also move to some specific position using code is difficult. I am making two recyclerView dependent to each other with the Horizontal Scroll and center selection. So my problem is using the method of Notifydatasetchanged and reseting recyclerView postion to 0 and it's scrolling selection range because it's returning wrong index... When i want to get center selection index after changing data. I am using below example to achieve this with some edits. Get center

Does anybody know how to use/enable the animated icons?

萝らか妹 提交于 2019-12-10 12:35:37
问题 Does anybody know how to use/enable the animated icons in an Angular WebApplication which are shown in the material design documentation: https://material.io/design/iconography/animated-icons.html#usage 回答1: As other have stated the examples on the Material Icon sites would have to be built. However, I found my way to this question looking for a guide on how to animate angular material icons and for others looking for the same I have a solution. The default animation can be customized to

Designing day chooser like found in clock in android L

偶尔善良 提交于 2019-12-10 12:08:27
问题 I am working on an app where I want to put day chooser like below (which I saw in clock app of android L). Anyone knows how to achieve it? Or is there any library or project implementing this is present? 回答1: Here is an example by radio group which i tried. maybe its helpful for you. just take a look once. your main xml file <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#655EF9" android:orientation="horizontal"> <CheckBox android

Material Design's 500 colors not enough contrast with white

天大地大妈咪最大 提交于 2019-12-10 12:08:08
问题 I tried Android Studio's Theme Editor today and got some warnings from it. According to the material design guidelines, I should use 500 as the primary colors but why is that the Theme Editor says that my primary color (Material Light Blue 500) doesn't have enough contrast with my textColorPrimary(#ffffff)? I also think that by not having the correct colors, my app title gets a black color on the recent apps screen which should be white. 回答1: The text color in Recent apps gets computed

Material Transitions in pre lollipop apps

百般思念 提交于 2019-12-10 12:02:38
问题 I am trying to use the transitions which introduced in material design in pre - lollipop apps(Min API19). I was going through http://www.google.com/design/spec/animation/meaningful-transitions.html#meaningful-transitions-visual-continuity transitions. But couldn't find how to do these transition mainly the second one on click of list item it expands the details. Can anybody help me to do this. Thanks 回答1: You cannot use the " Material transitions " (or shared content animations) in pre

how to put a button in an editText [closed]

老子叫甜甜 提交于 2019-12-10 11:48:33
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 months ago . I am making a chat application and I wanted to put a button in an editText to enable the sending of Media files. I don't know how to go about it. Tried to make the vector asset in the editText clickable but it is not going 回答1: You can use the official TextInputLayout component.

How to replace Angular Material Styles on own?

爷,独闯天下 提交于 2019-12-10 11:43:42
问题 I try to changes CSS styles in style.css of components file like this: .mat-tab-label { border-radius: 3px; background-color: #eeeeee; } But it does not repalce Angular Material styles. Any custom style can not overwrite Angular Material styles. 回答1: You can achieve that by adding /deep/ before the css class: /deep/ .mat-tab-label { border-radius: 3px; background-color: #eeeeee; } OR >>> .mat-tab-label { border-radius: 3px; background-color: #eeeeee; } UPDATE: /deep/ and >>> will be

Can't apply a colorFilter to text selection handles

守給你的承諾、 提交于 2019-12-10 11:08:42
问题 I'm trying to bring material text selection handles to my app. I got drawables from the SDK for middle/right/left handle (bitmaps) and text cursor (9-patch), and set: <item name="android:textSelectHandleLeft">@drawable/text_select_handle_left_mtrl_alpha</item> <item name="android:textSelectHandleRight">@drawable/text_select_handle_right_mtrl_alpha</item> <item name="android:textSelectHandle">@drawable/text_select_handle_middle_mtrl_alpha</item> <item name="android:textCursorDrawable">

Android Design Support Library And Material Design Backwards Compatibility?

。_饼干妹妹 提交于 2019-12-10 10:59:45
问题 I'm new here, so bear with me! I'm sorta confused about the new Design Support Library (and how one implements support libraries), and I had a two questions: I'm confused about how support libraries are implemented. Is it something as simple as saying 'if the OS version is below version 5.0, use the V7 support library', or would I have to code an 'Alternative Layout'(One for devices running +5.0, and one for devices running older version of android?) Does the Design Support Library replace or