android-compatibility
What is LinearLayoutCompat in appCompat v7?
The class LinearLayout exists since API level 1, but some APIs were added after that, for example, setShowDividers introduced on API level 11. So in this case setShowDividers (and it’s parameters) should be invoked using LinearLayoutCompat instead LinearLayout if you are targeting a platform with API level below 11.
How to determine fragment restored from backstack
I think that most simple way is do this for example in onViewCreated() method: if (savedInstanceState == null && !mAlreadyLoaded) { mAlreadyLoaded = true; // Do this code only first time, not after rotation or reuse fragment from backstack } Because when android put fragment on backstack, it only destroy its view, but don’t kill … Read more
reusing fragments in a fragmentpageradapter
The FragmentPagerAdapter already caches the Fragments for you. Each fragment is assigned a tag, and then the FragmentPagerAdapter tries to call findFragmentByTag. It only calls getItem if the result from findFragmentByTag is null. So you shouldn’t have to cache the fragments yourself.
Using android vector Drawables on pre Lollipop crash
LATEST UPDATE – Jun/2019 Support Library has changed a bit since the original answer. Now, even the Android plugin for Gradle is able to automatically generate the PNG at build time. So, below are two new approaches that should work these days. You can find more info here: PNG Generation Gradle can automatically create PNG … Read more
Difference between android-support-v7-appcompat and android-support-v4
UPDATE There are many changes done into support library since this question was answered. Good thing is, it is very well documented also. So you must read Support Library Documentation for more details and more available support library. Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries … Read more