Tag: android-support-library

including list_content into list layout to retain ListFragment functionality

First of, I’m using The Android Compatibility Library V4 rev.3 for my 1.6(Donut) When you first create a ListFragment it displays an indeterminant progress indicator untill you use setListAdabpter(). According to the documentation of ListFragment.onCreateView, if I want to use a custom lay out: If you are overriding this method with your own custom content, […]

Snackbar and other animations stopped working on some Android devices

I have a very odd issue that I cannot figure out. I was not an issue until recently but I can’t seem to revert back to prevent it. Also the other odd thing is it works on some devices and others it does not. The issue is animations. One in particular is snack bar. The […]

Android appcompat v7 error

Being new to Android developent I followed the simplest of tutorials, built a new android project, accepting all default settings (built it for kitkat). To my dismay I have an un-planned project – appcompat_v7, along with the errors: The container ‘Android Dependencies’ references non existing library ‘C:\Users…\workspace\appcompat_v7\bin\appcompat_v7.jar’ and twice the following The project cannot be […]

Inheriting AppCompat 22.1.1 Dialog colorAccent from app theme doesn't work

I’m trying to set up AppCompat’s Dialogs so that the buttons use the same color as the application’s accent color, without repeating the color itself. This was working perfectly with AppCompat v22 (only for Lollipop, obviously) by using this styles file in values-v21: <style name=”AppTheme” parent=”@style/Theme.AppCompat”> <item name=”colorAccent”>#FF9800</item> <item name=”android:alertDialogTheme”>@style/AlertDialogTheme</item> </style> <style name=”AlertDialogTheme” parent=”android:Theme.Material.Dialog.Alert”> <item […]

ActionBar with support library and Fragments overlay content

I added the android-support-library-v7-appcompat to my project to support ActionBar from API level 7 above. It works like a charm on android 4.0+ and also on android 2.3 with a normal Activity that has setContentView in onCreate, but when the activity is loading an Fragment in onCreate the ActionBar gets overlapped with the content of […]

Start Activity from Fragment using Transition (API 21 support)

I’m trying to port an Android app to the new support library (support-v4:21.0.0) and I’m having trouble starting Activities from Fragments with a transition. In my Activities, I’ve been doing something like: Bundle options = ActivityOptionsCompat.makeSceneTransitionAnimation(this).toBundle(); ActivityCompat.startActivityForResult(this, intent, REQUEST_SOMETHING, options); which works fine for Activities. However, if I try to do something similar with Fragments, […]

android.support.v7.widget.RecyclerView failed to instantiate

I created an Android application project in eclipse for APIs 15-21. I imported libraries of appCompat v7, cardView and recyclerView but on adding recyclerView in my XML it gives android.support.v7.widget.RecyclerView failed to instantiate. I have the latest SDK with updated libraries. java.lang.UnsupportedOperationException: Unsupported Service: accessibility at com.android.layoutlib.bridge.android.BridgeContext.getSystemService(BridgeContext.java:465) at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:290) at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:266) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at […]

Prevent CollapsingToolbarLayout collapse if not needed

Using: compile ‘com.android.support:design:23.0.0’ compile ‘com.android.support:appcompat-v7:23.0.0’ compile ‘com.android.support:cardview-v7:23.0.0’ compile ‘com.android.support:recyclerview-v7:23.0.0’ With the project Cheesesquare updated. Into the detail of cheese, I remove 2 cards (to have only one). Is there a way to prevent the collapsing of the toolbar that show a blank space?

What is an Android Support Library?

What is the purpose of an Android Support Library? Does this mean http://developer.android.com/tools/extras/support-library.html? Currently my app minSdkVersion is restricted to level 10. I am trying to use ViewPager, which is not available for a higher API (for example for level 16)… What does this support library mean? Does it mean I can use ViewPager, and […]

ViewPager inside Fragment loses it's content when the Fragment is reshown

I have a simple Fragment with a ViewPager. I’m using the up to date support library, v4 rev18! If I show it the first time, everything works fine, if I go back and show it again, the app crashes with the following exception: java.lang.NullPointerException at android.support.v4.app.FragmentManagerImpl.getFragment(FragmentManager.java:569) at android.support.v4.app.FragmentStatePagerAdapter.restoreState(FragmentStatePagerAdapter.java:211) at android.support.v4.view.ViewPager.onRestoreInstanceState(ViewPager.java:1281) at android.view.View.dispatchRestoreInstanceState(View.java:12043) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2688) at […]

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