Retain Fragment state between Activities

Since API Level 13 (HONEYCOMB_MR2, June 2011), you can save and restore the state of a fragment across activities. To save the state, use FragmentManager.saveFragmentInstanceState(), providing a reference to the Fragment whose state you wish to save. The Fragment must be attached at the time you attempt to save its state. To restore the state, … Read more

Styling EditText view with shape drawable to look similar to new holographic theme for Android < 3.0

It’s a little hack, but unless you find something better, this way it should be possible. <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android” > <item> <shape > <solid android:color=”@color/border” /> </shape> </item> <!– main color –> <item android:bottom=”1.5dp” android:left=”1.5dp” android:right=”1.5dp”> <shape > <solid android:color=”@color/background” /> </shape> </item> <!– draw another block to cut-off the left and right … Read more