Main. XML is as follows:
<? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Orientation = "vertical" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent"> <listview Android: id = "@ + ID/listview" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: layout_weight = "1"/> <button Android: id = "@ + ID/button" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: text = "Clear filecache"/> </linearlayout>
Listviewitem. XML is as follows:
<? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content"> <imageview Android: Id = "@ + ID/imageview" Android: layout_width = "50dip" Android: layout_height = "50dip" Android: src = "@ drawable/stub" Android: scaletype = "centercrop"/> <textview Android: id = "@ + ID/textview" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_weight = "1" Android: layout_gravity = "Left | center_vertical" Android: textsize = "20dip" Android: layout_marginleft = "10dip"/> </linearlayout>