1) want the ListView alive Girdview left some space, but ScrollBar to the right of the screen
adding in XML
Android:paddingleft = "8DP" Android:paddingright = "8DP" Android:scrollbarstyle = "Outsideoverlay"
2) Using XML to realize the drawable of a rounded rectangle
<?XML version= "1.0" encoding= "Utf-8"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android"Android:shape= "Rectangle" > <CornersAndroid:radius= "8DP" /> <SolidAndroid:color= "#ffffffff" /></Shape>
If you want to dynamically change the background color of a rounded rectangle
New gradientdrawable (); // Set rounded corners Gd.setcornerradius (8f); // Set Color
3) Add in the XML of layout
Android:animatelayoutchanges= "true"
API level greater than or equal to 11, when the layout changes, there will be animation effect
4) If the use of framelayout, and the use of margin, remember to framelayout set a android:layout_gravity, on the 2.2/2.3 system, if not set gravity,
Margin is invalid, is a system bug it.