In the Item layout, set the layout background to dynamic image reference:
Applist_view.xml
[Html]
<? 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 = "120dp"
Android: background = "@ drawable/appdownload_listview_item_selector"
Android: gravity = "center_vertical"
Android: orientation = "horizontal">
<ImageView
Android: id = "@ + id/app_icon"
Android: layout_width = "50dp"
Android: layout_height = "50dp"
Android: layout_marginLeft = "10dp"
Android: layout_marginRight = "5dp"/>
<LinearLayout
Android: layout_width = "wrap_content"
Android: layout_height = "fill_parent"
Android: layout_weight = "1"
Android: gravity = "center_vertical"
Android: orientation = "vertical">
<RelativeLayout
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: layout_marginBottom = "5dp">
<TextView
Android: id = "@ + id/app_Name"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentLeft = "true"
Android: textColor = "#443522"
Android: textSize = "20sp"/>
<TextView
Android: id = "@ + id/app_size"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentRight = "true"
Android: textColor = "# AC9681"
Android: textSize = "14sp"/>
</RelativeLayout>
<RelativeLayout
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content">
<TextView
Android: id = "@ + id/app_Cat"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentLeft = "true"
Android: textColor = "# AC9681"
Android: textSize = "14sp"/>
<Net. youpo. Market. UI. StarView
Android: id = "@ + id/app_starView"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentRight = "true"/>
</RelativeLayout>
</LinearLayout>
<ImageView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: padding = "3dp"
Android: src = "@ drawable/download_list_item_splite_line"/>
<LinearLayout
Android: id = "@ + id/applist_download_btn"
Android: layout_width = "wrap_content"
Android: layout_height = "fill_parent"
Android: gravity = "center"
Android: orientation = "vertical"
Android: padding = "5dp">
<ImageView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: background = "@ drawable/download_icon"/>
<TextView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: text = "Download"
Android: textColor = "#443522" type = "codeph" text = "/codeph"/>
</LinearLayout>
</LinearLayout>
<? Xml version = "1.0" encoding = "UTF-8"?>
<LinearLayout xmlns: android = www.2cto.com
Android: layout_width = "fill_parent"
Android: layout_height = "120dp"
Android: background = "@ drawable/appdownload_listview_item_selector"
Android: gravity = "center_vertical"
Android: orientation = "horizontal">
<ImageView
Android: id = "@ + id/app_icon"
Android: layout_width = "50dp"
Android: layout_height = "50dp"
Android: layout_marginLeft = "10dp"
Android: layout_marginRight = "5dp"/>
<LinearLayout
Android: layout_width = "wrap_content"
Android: layout_height = "fill_parent"
Android: layout_weight = "1"
Android: gravity = "center_vertical"
Android: orientation = "vertical">
<RelativeLayout
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: layout_marginBottom = "5dp">
<TextView
Android: id = "@ + id/app_Name"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentLeft = "true"
Android: textColor = "#443522"
Android: textSize = "20sp"/>
<TextView
Android: id = "@ + id/app_size"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentRight = "true"
Android: textColor = "# AC9681"
Android: textSize = "14sp"/>
</RelativeLayout>
<RelativeLayout
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content">
<TextView
Android: id = "@ + id/app_Cat"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentLeft = "true"
Android: textColor = "# AC9681"
Android: textSize = "14sp"/>
<Net. youpo. Market. UI. StarView
Android: id = "@ + id/app_starView"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentRight = "true"/>
</RelativeLayout>
</LinearLayout>
<ImageView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: padding = "3dp"
Android: src = "@ drawable/download_list_item_splite_line"/>
<LinearLayout
Android: id = "@ + id/applist_download_btn"
Android: layout_width = "wrap_content"
Android: layout_height = "fill_parent"
Android: gravity = "center"
Android: orientation = "vertical"
Android: padding = "5dp">
<ImageView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: background = "@ drawable/download_icon"/>
<TextView
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: text = "Download"
Android: textColor = "#443522" type = "codeph" text = "/codeph"/>
</LinearLayout>
</LinearLayout>
Appdownload_listview_item_selector.xml
[Html]
<? Xml version = "1.0" encoding = "UTF-8"?>
<Selector xmlns: android = "www.2cto.com">
<Item android: drawable = "@ drawable/download_list_item_press"
Android: state_pressed = "true"/>
<Item android: drawable = "@ drawable/download_list_item_normal"/>
</Selector>
<? Xml version = "1.0" encoding = "UTF-8"?>
<Selector xmlns: android = "www.2cto.com">
<Item android: drawable = "@ drawable/download_list_item_press"
Android: state_pressed = "true"/>
<Item android: drawable = "@ drawable/download_list_item_normal"/>
</Selector>
Author: h3c4lenovo