material-design

Fragment layout with FAB conflict with CoordinatorLayout

陌路散爱 提交于 2020-01-03 17:24:33
问题 Im using MaterialDrawer with a MainDrawerActivity where I replace each fragment inside container FrameLayout based on selected item, but I want to add a FAB (just for this fragment) that interacts with CoordinatorLayout so it can handle cool animations. MainDrawer layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width=

Why Google Material Icons Can't be Shown on Mobile

你离开我真会死。 提交于 2020-01-03 16:50:49
问题 I am using Materializecss and it uses Google design icons. On some mobiles, Google Material-Icons can'be shown. What is caused it? 回答1: The problems is occurred because of text-rendering property. Text-rendering is not a CSS standart but it allows use to choose text quality. In google material css this property comes with it's default value . If you add this style you will solve the problem : .material-icons { text-rendering: optimizeLegibility; } By this definition, we say to the browser

Ripple requires API level 21 (current min is 11), android?

情到浓时终转凉″ 提交于 2020-01-03 09:31:43
问题 I have the below drawable <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight" > <item> <shape android:shape="oval" > <solid android:color="?android:colorAccent" /> </shape> </item> And I am getting this error <ripple> requires API level 21 (current min is 11) How do I solve it? 回答1: You are using minsdk=11. You can't use this drawable with api<21. You have to use diffent versions of this

Ripple requires API level 21 (current min is 11), android?

白昼怎懂夜的黑 提交于 2020-01-03 09:30:23
问题 I have the below drawable <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight" > <item> <shape android:shape="oval" > <solid android:color="?android:colorAccent" /> </shape> </item> And I am getting this error <ripple> requires API level 21 (current min is 11) How do I solve it? 回答1: You are using minsdk=11. You can't use this drawable with api<21. You have to use diffent versions of this

popupBackground glitches with Material Design

◇◆丶佛笑我妖孽 提交于 2020-01-03 06:44:13
问题 I have been working on updating my apps to Material Design. I have an app that uses tabs. For some reason whenever I use android:popupBackground to set the drop down menu color it freaks out. I set up a default project with tabs and used the following theme and the same thing happened. Has anyone one else had this problem? My app is open source and so all the code is available here GitHub <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light

How to get a Scrolling Activity With Navigation Drawer in Android (Material Design)

南笙酒味 提交于 2020-01-03 02:37:08
问题 I've been interested in material design and wanted to build a layout for the main page of my app so that it looks like the default template for Scrolling Activity but also has a Navigation Drawer like the default template for Navigation Drawer Activity for easy navigation. As an example, Google's Play Music app already does this sort of thing. Have a look: Scrolling list with a banner and a FAB at the top, Navigation Drawer, accessed by swiping from over to the left I've searched everywhere

smooth scrolling for recyclerview

一笑奈何 提交于 2020-01-03 02:04:47
问题 I got some problems in scrolling the recyclerview. I added the smoothScrollToPosition method to LinearLayoutManager but it didn't change anything.I tried to added the attribute named app:fastScrollEnabled but it caused error. I want a smooth scrolling. What should i do? Thank you in advance :) XML Code: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res

Change background color of title in CollapsingToolbarLayout using scrim or color overlay

孤街浪徒 提交于 2020-01-03 02:00:29
问题 I have been dealing for a while now with changing the color of the background of the title in the collapsingtoolbarlayout but only when is expanded. Why I want is either have a transparent scrim background or a color overlay (like the documentation says): I want this behaviour (or a protective screen with transparent background is also possible), the thing is I found exactly the same question on this post: Android CollapsingToolbarLayout Title background I've applied this solution to my

How to add listView inside cardView android?

坚强是说给别人听的谎言 提交于 2020-01-02 22:38:37
问题 Forgive me for any mistakes. I'm a beginner. Can anyone please explain how to create a listview inside a cardview layout in android. Example settings app in android 6.0 I wanna create a scrollable cardview layout with listview items in each cardview layout. I have searched enough online and nothing seems to help me. If you have any solution this it would be helpful for me. 回答1: The best way to do this is using a RecyclerView with a vertical LinearLayoutManager (which will look the the same as

Material Components for the web modal drawer example using CDNs

你离开我真会死。 提交于 2020-01-02 05:36:07
问题 Examples on using Material Components for Web CDNs for front-end design are not that helpful. I found this demo of a modal drawer but it doesn't seem to use the published CSS and JavaScript CDNs. Demo : Modal drawer demo How to implement a modal drawer using Material Components' CDNs? 回答1: It is a bit difficult to get going with MDC using unpkg bundles instead of consuming individual components via webpack. The Getting Started documentation helps a bit but it can still be difficult to