Tag: android-support-library

CoordinatorLayout with CollapsingToolbarLayout breaks with Keyboard in Dialog fragment

I recently decided to move my app to using the new Support design library, and recently discovered a very nasty bug. Say I have a CoordinatorLayout hosting an AppBarLayout and any scrollable view, be it a ViewPager, NestedScrollView, or even a RecyclerView with the required scroll behavior; choosing to display a dialog fragment that displays […]

Support library version

I try to inject support libraries into my Android Studio project. If I try anything lower than 20 it says: library should not use a lower version then targetSdk version. If I use compile ‘com.android.support:support-v4:20’ I get: Failed to find: com.android.support:support-v4:20 If I use compile ‘com.android.support:support-v7:20.0.+’ I get: Avoid using + in version numbers, can […]

ClassCastException on a subclass of ListFragment using compatibility library

This only happens when using the compatibility library for pre-3.0 devices I’m getting an error that I cannot pin down. I have an Activity with a ListFragment and standard Fragment. It is just like the example provided in the Developers section of the Android Dev Guide. ListFragment Subclass (no functions overridden) public class ItemListFragment extends […]

android-support-v4.jar isn't importing correctly in Eclipse

I’m trying to get an app to compile that uses the android-support-v4.jar and the Fragmentation classes it contains, but I keep getting messages whenever I try to compile that there are errors in the code. All of the errors have to do with different Fragmentation classes that are in the .JAR. I have tried ctrl-clicking […]

Android Activity transitions using Support v4 up to date with Android L

I was implementing material design for my app. I saw that it is possible to make transitions between activities just here: http://android-developers.blogspot.com.es/2014/10/implementing-material-design-in-your.html So i tried to follow what “Authentic motion” section says: ActivityMain.java Intent intent = new Intent(); String transitionName = getString(R.string.transition_album_cover); … ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, albumCoverImageView, // The view which starts the transition […]

Gradle can't find dependency (Android support library)

I have a problem that Gradle can’t find my dependency (Android support library). My build.gradle looks like this: buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.4’ } } apply plugin: ‘android’ dependencies { compile files(‘libs/FlurryAgent.jar’) compile group: ‘com.google.android’, name: ‘support-v4’, version: ‘r7’ compile files(‘libs/YouTubeAndroidPlayerApi.jar’) } android { compileSdkVersion 17 buildToolsVersion “17” defaultConfig { […]

Toolbar is hidden in nested PreferenceScreen

I use PreferenceFragment in ActionBarActivity from support-v7 library. In the Activity I have Toolbar. Everything goes okay, until I open a nested PreferenceScreen. In the opened screen the Toolbar is hidden. Maybe somebody know a workaround for this issue? Preferences xml-file: <?xml version=”1.0″ encoding=”utf-8″?> <PreferenceScreen xmlns:android=”http://schemas.android.com/apk/res/android” > <PreferenceCategory android:title=”Main category” > <EditTextPreference android:defaultValue=”defaultValue” android:key=”key_global_setting” android:title=”Global […]

getSupportActionBar using FragmentActivity

I’m using fragment activity on one project, but it seems v4 support FragmentActivity doesn’t has getSupportActionBar() method, and I need to use the support one in order to use android.support.v7.app.ActionBar

NestedScrollView fling stopping bug on Nougat (API 25)

I have a strange issue with NestedScrollView fling on Nexus 5x (7.1.2) and Google Pixel (7.1.1). On other OS versions it works OK. Fling animation sometimes stops right after lifting up a finger. It stucks and the next few flings may be stopping as well. In order to reproduce it, you need to fling several […]

What is the scope of a LoaderManager?

When identifying Loaders in your LoaderManager, you use unique ids. I’m asking about how unique those ids have to be. Does every activity and fragment have its own LoaderManager? Do fragments use the LoaderManager of the Activity they’re attached to? Is there only one LoaderManager that the application owns? Bonus points if you can tell […]

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