Tag: android-support-library

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState with DialogFragment

I am facing issue with DialogFragment / getSupportFragmentManager / Android version 4.x 01-10 19:46:48.228: E/AndroidRuntime(9879): java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState 01-10 19:46:48.228: E/AndroidRuntime(9879): at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1314) 01-10 19:46:48.228: E/AndroidRuntime(9879): at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1325) 01-10 19:46:48.228: E/AndroidRuntime(9879): at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:548) 01-10 19:46:48.228: E/AndroidRuntime(9879): at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:532) 01-10 19:46:48.228: E/AndroidRuntime(9879): at android.support.v4.app.DialogFragment.show(DialogFragment.java:127) 01-10 19:46:48.228: E/AndroidRuntime(9879): at com.v1.mypck.TermsAndConditions.showDialog(TermsAndConditions.java:256) 01-10 19:46:48.228: […]

Using FragmentStatePagerAdapter WITHOUT support library

I would like to know is it possible to use the class FragmentStatePagerAdapter or its equivalent without the support library? I know how to use native fragments in place of those from the support library and many other classes have their similar equivalents, but I can’t find what should be used instead of this class. […]

What is the ButtonBarLayout and how should we use it?

When I developed, I found a new widget called android.support.v7.widget.ButtonBarLayout unexpectedly. I tried to search it on the internet, but nothing was found, even on the official development documents site. In the meantime, I found two ButtonBarLayout when I search ButtonBarLayout everywhere in Android Studio, one is android.support.v7.widget.ButtonBarLayout and the other is com.android.internal.widget.ButtonBarLayout. I tried […]

Android Studio: Failed to find: 'com.android.support:support-v4:19.1.0'

I want to build an app in Android Studio with the support library but I get the following error when adding the dependency for the support library: Error:Failed to find: com.android.support:support-v4:19.1.0 Here is my build.gradle file apply plugin: ‘com.android.application’ android { compileSdkVersion 19 buildToolsVersion ’20’ defaultConfig { applicationId “sample.myapplication” minSdkVersion 15 targetSdkVersion 19 versionCode 1 […]

RecyclerView items with big empty space after 23.2.0

After update to v23.2.0 in my RecyclerView I have items with huge empty vertical space, between the items. My item layout is very simple: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” >

Proguard warnings “can't write resource (Duplicate zip entry)”

I’m using IntelliJ and running Proguard in debug mode but I can’t seem to get rid of warnings such as: ProGuard: [MyApplication] Warning: can’t write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v13.jar:META-INF/MANIFEST.MF]) This project has a couple of modules and android-support-v13.jar is being used on 2 of them. I thought that was the issue so I […]

Android Support Package / Compatibility Library – use v4 or v13?

I’ve just read this description of the Android Support Package / Compatibility Library… http://developer.android.com/sdk/compatibility-library.html … and it’s left me a little confused! It says that the v13 library is a superset of v4 but I thought it was the other way around? Getting practical: If I want to use the compatibility library such that my […]

Error when using any Android Design Support Library Elements

Error inflating anything from the design support library xml <android.support.design.widget.FloatingActionButton android:layout_width=”wrap_content” android:layout_height=”wrap_content”/> build.gradle dependencies { compile ‘com.android.support:support-v4:22.2.0’ compile ‘com.android.support:design:22.2.0’ compile ‘com.android.support:multidex:1.0.1’ compile ‘com.android.support:support-v13:22.2.0’ compile ‘com.android.support:appcompat-v7:22.2.0’ project build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:1.2.3’ } } allprojects { repositories { mavenCentral() } } Error: Binary XML file line #115: Error inflating class […]

If I use new “ V7 Appcompat library ”, do I still need “ V4 Support Library ” for a minimum SDK = 7?

I am migrating from Action Bar Sherlock to Action Bar compat. I remove ABS and I had support-v4-google maps in it, I got errors. I will add the v4 directly to the project now to see if it solve, but I want to know: I don’t really understand from the documentation if libraries are redundant […]

Android ViewPager with previous and next pages visible?

I am currently building a horizontal gallery of videos. I’d like to make something like that with only one video centered and part of previous and next videos: I first opted for a Gallery but its limitations made me look for something else. I’d like to show a page indicator and it is quite difficult […]

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