Tag: android-5.0-lollipop

Styling a AppCompatButton in v21 to have no shadow and corner radius of zero

I have a AppCompatButton defined in a XML layout, and I have set a theme for it like this: android:theme=”@style/CustomAccentOverlay” And I have set: android:stateListAnimator=”@null” to remove the shadow. I have two problems with this. The height of the button is deducted the height of the shadow, even though the shadow is not shown. Should […]

Shared element transition among fragments that belong to different activities in Android lollipop

I have a shared element in a fragment that belongs to one Activity. I want to make a shared element transition in Android Lollipop with an element that is part of a fragment that belongs to another activity. Is it possible? How can I achieve that?

ClassNotFoundException: Didn't find class “android.support.design.R$styleable”

Hi I am using NavigationView but I am getting error, below is my xml, I have already included android support and v7 library project.properties as I am not using Android studio target=android-22 android.library.reference.1=../android-support-v7-appcompat android.library.reference.2=../design <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/res-auto” android:id=”@+id/drawer_layout” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fitsSystemWindows=”true” tools:context=”com.toxic.apps.kodi” > <LinearLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” > <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?attr/actionBarSize” android:background=”@color/primary” android:minHeight=”?attr/actionBarSize” […]

Parsing Data for android-L failed

i have update my sdk for L Developer preview. and i am not able to load my layout for API 20 my JDK compilence and .class file compatibility is 1.7. here is snap 1) 2) so may i have to change any compile level?

initializeScrollbars is undefined?

Background I’m using this library which for one of its classes (that extends from ViewGroup), in “PLA_AbsListView.java”, inside the CTOR, there are those lines: final TypedArray a = context.obtainStyledAttributes(R.styleable.View); initializeScrollbars(a); a.recycle(); Recently, I’ve updated the SDK & ADT of Android to support the new Android version (Lollipop – API21) . The problem Ever since I’ve […]

RelativeLayout zorder lollipop

I have a little layout working correctly on API 19: 4.2.2 but can’t make it work on API 21: 5.0.1. Here is the layout: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” > <Button android:id=”@+id/start_button” android:layout_width=”match_parent” android:layout_height=”match_parent” android:textStyle=”bold” android:textSize=”30sp” android:background=”@color/start_button_bg” android:textColor=”@color/start_button_text” android:text=”@string/start_process”/> <TextView android:id=”@+id/pro_icon” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_margin=”10dp” android:layout_alignParentRight=”true” android:layout_alignParentTop=”true” android:textColor=”@android:color/white” android:background=”@drawable/pro_icon” android:text=”PRO” android:gravity=”center” android:textAppearance=”?android:attr/textAppearanceMedium”/> </RelativeLayout> Really […]

Clarification regarding Android “Attribute elevation is only used in API level 21 and higher”

I’m a newcomer to developing for Android, and the concept of developing across multiple different platforms with different supported features on each is really making my head hurt. For example, if I go into an xml file and set android:elevation=”10dp” and it gives me the message “Attribute elevation is only used in API level 21 […]

How to get notified when a transition between activities have finished?

Just as the title says… I’m using a transition between activities, and I’d like to have some kind of listener (or event) for both activities, for when the transition has finished and for just before it started. Here’s a sample code of creating the transition: final Intent intent = new Intent(activity, TargetActivity.class); if (initialQuery != […]

Detecting Android L Battery Saver

One of the new features of Android L is a battery saver that kicks in at 15%. Is there some way to detect when this is active, so my app will respond correctly? http://www.technobuffalo.com/2014/07/02/android-l-project-volta-battery-life/ I would like my app to get a callback from the operating system when the this mode is active so I […]

Home button in action bar not working in Lollipop

I have a problem, cause I’m developing app for lollipop without support library v7, so I need to use standard ActionBar. Previously I used setHomeButtonEnabled in multiple activities with actionBar. When I switched app theme to material everything is working fine, except setHomeButtonEnabled method. Title is not clickable. Help!

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