material-design

How to make shadow in layer-list?

余生颓废 提交于 2019-12-22 22:23:10
问题 The problem is as follows: I need to make in app widget some actionbar like this: For this I use layer-list with shape. <?xml version="1.0" encoding="utf-8"?> <!-- Bottom 2dp Shadow --> <item> <shape android:shape="rectangle"> <solid android:color="#027668"/> <corners android:radius="12dp"/> </shape> </item> <!-- White Top color --> <item android:bottom="4dp"> <shape android:shape="rectangle"> <solid android:color="#20a18b" /> <corners android:radius="7dp" /> </shape> </item> And I get some

NavigationView and Translucent Status Bar

江枫思渺然 提交于 2019-12-22 17:09:08
问题 I followed all the tips on SO on how to achieve this and no success so far... I would like to have a Semi-transparent/transparent (not sure of the difference) status bar. UPDATE 25/03/16: I tried all kinds of Theme attributes without progress. Updated question with what I attempted for the v21 styles file and a Bounty . Does anyone have an idea? fitSystemWindows is set in both my DrawerLayout and NavigationView in the xml: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas

Inputs in material design are not themed

核能气质少年 提交于 2019-12-22 14:39:00
问题 I've got working, buttons, carts, lists, but my inputs are not themed like in the demo here: https://material.angularjs.org/#/demo/material.components.input Now I've simply copied code from demo, but it's still not working. Here is html: <div ng-controller="View1Ctrl" layout="column" md-theme="green"> <md-toolbar class="md-primary"> <h1 class="md-toolbar-tools"> Top Secret Project </h1> </md-toolbar> <md-content class="md-padding"> <form name="projectForm"> <md-input-container> <label

Android L — Play Ripple Effect on View

一个人想着一个人 提交于 2019-12-22 13:59:06
问题 I am trying to play a ripple effect (from Android L) on a view at a certain time (not on the view being touched). To be specific, when the user successfully changes some text, I want a certain view to play a green ripple effect to show success. Is there any way to do this? I have tried putting a RippleDrawable in an Animation, putting the RippleDrawable as the background for my "success view." But, I can't figure out how to play the ripple animation as I have described. P.S. My project is

RecyclerView and ViewPager with collapsing toolbar

房东的猫 提交于 2019-12-22 13:39:31
问题 I am trying to create this kind of a layout where - A CollapsingToolbarLayout that has a ViewPager like google play app. Below that there is a Grid RecyclerView . And at the end, there is another ViewPager . The RecylerView scrolls normally until the end when CollapsingToolbarLayout expands. <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@

Point of origin animation android

て烟熏妆下的殇ゞ 提交于 2019-12-22 11:36:11
问题 I am currently doing an animation from the material spec design, now I want to enable to do a point of origin animation which is showed here: Sample Animation Link How can I do that animation of pre lollipop? Is there a way doing it in pre-lollipop devices? 回答1: I've achieved this point of Origin creating a XML based approach and applying it to your custom Theme. Create anim/anim_in.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android">

“Failed to convert ?attr/colorPrimary into a drawable”

佐手、 提交于 2019-12-22 08:08:53
问题 I am starting a new project, so the project is more or less "empty". I just added a MainActivity, with a MainActivityFragment. I haven't added any code at all to them. Now, I edit the styles.xml so it looks like this: <resources> <!-- Base application theme. --> <style name="MyTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> <item name="android:windowNoTitle">true</item> <!--We will be using the toolbar so no need to show ActionBar--> <item name="android:windowActionBar"

can't get my location and location button not show

☆樱花仙子☆ 提交于 2019-12-22 07:58:51
问题 after i make drawer menu and floating button why my maps can't get my location and location button not show, and why the search place button when it clicked so that force stop? before i add drawer menu and floating button, it's all okay.. Before After activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk

Android full screen dialog fragment like calendar app

删除回忆录丶 提交于 2019-12-22 07:56:10
问题 I am trying to achieve a full-screen dialog like the below image. I am able to show a full screen dialog but when the dialog is shown the status bar color changes to black and does not keep the primary-dark color. Heres my dialog fragment public class IconsDialogFragment extends DialogFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout to use as dialog or embedded fragment return inflater.inflate(R

how can i show icon app in Lollipop Toolbar?

大城市里の小女人 提交于 2019-12-22 06:38:14
问题 I am missing an app icon after switching from ICS ActionBar to Lollipop toolbar . Is it possible? Please help me. Thanks mDrawerToggle.setDrawerIndicatorEnabled(false); 回答1: The use of application icon and a title is discouraged on API 21,according to Material Design. Anyway if you want to use an icon, you can use the setLogo method in your Toolbar. 来源: https://stackoverflow.com/questions/27768109/how-can-i-show-icon-app-in-lollipop-toolbar