Tag: android-5.0-lollipop

Material Design Typography – Headlines, Titles, Spacing, Text Appearance

I’ve been following the Google official Material Design guidelines (http://www.google.com/design/spec/style/typography.html) on typography but I find them to be quite lacking. For instance, they list 10 styles you should use for things like body, subhead, title, headline display1, display2, etc. type text in your app… This leads me to the first problem. Problem #1: How does […]

How to trigger ripple effect on Android Lollipop, in specific location within the view, without triggering touches events?

This is a short question: Suppose I have a View with the RippleDrawable as background. Is there an easy way to trigger the ripple from a specific position without triggering any touch or click events?

Switchcompat not displaying the Switch

I am trying to use the latest appcompat which was updated for material design in my app to show the switch view as displayed in Lollipop(http://android-developers.blogspot.in/2014/10/appcompat-v21-material-design-for-pre.html), the problem is the switch is not getting displayed. My SDKmin is 14 and max is 21. I am using the below code in the layout: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” […]

How to Change the Text Selection Toolbar color which comes when we copy a text?

I am developing an application and i set “android:textIsSelectable” for the TextViews. But my material theme is not matching with the TextSelection appBar. Is there a way by which i can change the color of that appBar ?? Attached the Image Below Check it :-

Android App crashes on Lollipop

hi I am using google license checker on my app it works on API 19 and below but crashes on lollipop. I saw the code that has to be add to my license check code but I don’t know where to put this code or what should I edit. here is my code log: java.lang.IllegalArgumentException: […]

OnClickListener for CardView?

How do I attach an OnClickListener to a CardView? I want every single card to have a different action when clicked. I have a RecyclerView that has a custom adapter for displaying the cards. This is how it’s implemented.

Navigation drawer (menudrawer) Android 5 (lollipop) style

I’m using menudrawer library in my project (this one: https://github.com/SimonVT/android-menudrawer). I’m updating my app to be compatible with API21 (Android 5 Lollipop) and Material Design. When you use this library with API21 menudrawer icon looks bad. I want to achieve transition you can see in the new Play Store (new menudrawer icon transition to arrow). […]

How to postpone a Fragment's enter transition in Android Lollipop?

In Android Lollipop, the Activity#postponeEnterTransition() and Activity#startPostponedEnterTransition() methods give the Activity the ability to delay starting the entering and exiting shared element transitions until all data is loaded. These work great for Activity transitions. Is there a way to achieve the same effect when using Fragment transitions?

PercentRelativeLayout inside ScrollView

I have created a layout using a ScrollView which has a PercentRelativeLayout as its child. It doesn’t work on Lollipop and older devices but works fine on Marshmallow devices. Please check the code below: <ScrollView android:id=”@+id/scrollView” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fillViewport=”true”> <android.support.percent.PercentRelativeLayout android:id=”@+id/scrollContent” android:layout_width=”wrap_content” android:layout_height=”wrap_content” app:layout_heightPercent=”100%” app:layout_widthPercent=”50%”> <TextView android:id=”@+id/textView1″ android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”@android:color/holo_red_dark” android:text=”kkjknadko” android:textColor=”@android:color/black” app:layout_heightPercent=”10%” app:layout_widthPercent=”50%”/> <TextView […]

Android L SoundPool.load() regression

On Android L – the latest developer preview (Nexus 5), there seems to be a regression in the SoundPool.load() method which takes >5 seconds to load a sample (<100kb), where samples were loaded on pre-L systems instantly with the very same code. I tried OGG or MP3, both with same results. Tried different sizes but […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.