Tag: listview

Android ViewPager With ListView Pages

To implement multiple ListView for a Viewpager take a look at this example: MainActivity.java public class MainActivity extends Activity { /** Called when the activity is first created. */ private Context mContext; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext

Tagged with: , ,

Android ListView With Rounded Corners

To make a ListView with rounded corners make a new xml file which will handle the rounded corners. “roundedlistview.xml” <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”      android:shape=”rectangle”>      <gradient android:startColor=”#ffffff” android:endColor=”#000000″             android:angle=”270″/>  

Tagged with: , ,

Android Listview With Rounded Corners

To create a listview with rounded corners create a shape in xml. Create roundedcorner.xml in the res/drawable <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle” > <gradient android:angle=”90″ android:endColor=”#C0C0C0″ android:startColor=”#808080″ /> <corners android:bottomLeftRadius=”7dp” android:bottomRightRadius=”7dp” android:topLeftRadius=”7dp” android:topRightRadius=”7dp” /> <stroke android:width=”1px” android:color=”#000000″ /> </shape>

Tagged with: , , ,