material-design

Material Design backward compatibility

坚强是说给别人听的谎言 提交于 2019-12-17 15:26:24
问题 From examples provided on the Android Developer pages I see that new Views, like the RecyclerView , are backward compatible ( android.support.v7.widget.RecyclerView ). Are all the new things introduced in Material Design backward compatible (to which version)? 回答1: Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions. Support library: v7 appcompat library This library adds support

Styling ActionMode ActionBar in Android 5.0 Lollipop (with AppCompat)

情到浓时终转凉″ 提交于 2019-12-17 15:16:43
问题 I used this tutorial to facelift my Holo app for Lollipop: http://android-developers.blogspot.ru/2014/10/appcompat-v21-material-design-for-pre.html What I have: Theme <style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionModeOverlay">true</item> <item name="colorPrimary">@color/theme_primary</item> <item name="colorPrimaryDark">@color/theme_primary_dark</item> <item name="colorAccent">@color/theme_accent</item> </style> Toolbar layout <android.support.v7

Are Activity/Fragment Transitions compatible with pre-Lollipop devices?

旧巷老猫 提交于 2019-12-17 10:28:06
问题 I'm trying to make an Activity Transition using Shared Elements on a pre-Lollipop device (4.x). Is it possible? So far, I'm trying this: public class RewardDetail extends ActionBarActivity { @Override public void onCreate(final Bundle savedInstanceState) { ... ViewCompat.setTransitionName(imageView, TRANSITION_NAME); } ... public static void launch(ActionBarActivity activity, View transitionView, WelcomeReward detailData) { ActivityOptionsCompat options = ActivityOptionsCompat

How to do the new PlayStore parallax effect

浪尽此生 提交于 2019-12-17 10:16:00
问题 Does anyone know how can I achieve the new parallax scrolling effect - you can see the effect when you open an app on the PlayStore and try to scroll down, the content goes over the top image. How can I achieve that? 回答1: Google has recently announced Design support library and with this it has support for implementing Collapsing Toolbar . In addition to pinning a view, you can use app:layout_collapseMode="parallax" (and optionally app:layout_collapseParallaxMultiplier="0.7" to set the

How can I use custom theme palettes in Angular?

白昼怎懂夜的黑 提交于 2019-12-17 10:10:38
问题 I want to use my company's brand colors throughout the app. I have found this issue: AngularJS 2 - Material design - set color palette where I can build an allegedly custom theme, but it's basically just using different parts of pre-built palettes. I don't want to use Material2's predefined colors. I want my unique and special brand colors. Is there a better way (righter?) to create my own theme, than just hack around with _palette.scss ? Do I need to make a mixin for my brand palette? If so

Android FAB icon always black with MaterialComponents theme

我的梦境 提交于 2019-12-17 09:41:51
问题 I'm creating an Android app and I'm using the AndroidX libraries and Material design theme. My app theme on styles.xml is: <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> I have the following FAB from a custom library: <com.leinardi.android.speeddial.SpeedDialView android:id="@+id/work_log

FloatingActionButton with text instead of image

心不动则不痛 提交于 2019-12-17 08:34:06
问题 I'm trying to figure out how can be modified FloatingActionButton from android support library. Can it be used with the text instead of image? Something like this one: I see it extends ImageButton so I think not. Am I right? Is this correct in terms of Material Design in general? 回答1: With API 28 you can simply add text to Fabs using: Visit: https://material.io/develop/android/components/extended-floating-action-button/ <com.google.android.material.floatingactionbutton

What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design)

馋奶兔 提交于 2019-12-17 08:30:11
问题 I have reading Material Design Guidelines but I don't know what should be the color of the Ripple if it isn't black (with alpha). For example, I have an app with colorPrimary = blue, and colorAccent = red. Actually I am using the colorAccent (with alpha), I should use colorPrimary (with alpha) if I want a color different of black to the ripple? I checked all app of Google but they never use ripples with color. An image like I have now: 回答1: Use 26% alpha for colored ripples. Android L doesn't

What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design)

心不动则不痛 提交于 2019-12-17 08:30:00
问题 I have reading Material Design Guidelines but I don't know what should be the color of the Ripple if it isn't black (with alpha). For example, I have an app with colorPrimary = blue, and colorAccent = red. Actually I am using the colorAccent (with alpha), I should use colorPrimary (with alpha) if I want a color different of black to the ripple? I checked all app of Google but they never use ripples with color. An image like I have now: 回答1: Use 26% alpha for colored ripples. Android L doesn't

Android v21 Theme.Appcompat color accent is ignored, no padding on dialogs

北慕城南 提交于 2019-12-17 08:23:28
问题 I'm using ActionBarActivity from the Android 5 SDK and here is my theme.xml for v21 <style name="AppTheme_Light" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:colorPrimary">@color/abc1</item> <item name="android:colorPrimaryDark">@color/abc2</item> <item name="android:colorAccent">@color/abc3</item> </style> But the colors are ignored, and are replaced by a default teal color and all the dialogs appear without padding. Also, padding is also ignored in other places like