A fragment_home.xml
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android " android:orientation=" vertical " android:layout_width=" match_parent " android:layout_height= "Match_parent" > <include android:id= "@+id/home_titlebar" layout= "@layout/home_title_bar"/ > <com.handmark.pulltorefresh.library.pulltorefreshlistview android:id= "@+id/home_pull_to_ Refresh_listview " android:layout_width=" match_parent " android:layout_height=" Match_parent "/></ Linearlayout>
Two Home_head_page.xml
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "xmlns:app=" Http://schemas.android.com/apk/res-auto "android:orientation=" vertical " Android:layout_width= "Match_parent" android:layout_height= "Match_parent" Android:paddin gbottom= "@dimen/HEAD_PAGE_PADDINGTB" > <include android:id= "@+id/home_head_include_banner" layout= "@ Layout/home_banner "/> <relativelayout android:layout_width=" match_parent "android:layout_height=" 16 8DP "> <android.support.v4.view.viewpager android:id=" @+id/home_head_pager "Android:layo Ut_width= "Match_parent" android:layout_height= "match_parent" > </android.support.v4.view.viewpager& Gt <com.myxh.coolshopping.ui.widget.indicator android:id= "@+id/home_head_indicator" Android:layout_w Idth= "Wrap_content" android:layout_height= "Wrap_content" android:layout_alignparentbottom= "true" Android:layout_c Enterhorizontal= "true" app:indicator_number= "2" app:indicator_radius= "8" App:indicator_fo Recolor= "@color/app_yellow" app:indicator_bgcolor= "@color/bg_common_gray"/> </RelativeLayout> &l T;include android:id= "@+id/home_head_include_film" layout= "@layout/home_film" android:layout_width= "M Atch_parent "android:layout_height=" wrap_content "android:layout_margintop=" @dimen/head_page_paddingtb "/> </LinearLayout>
Banner two-page bar logo popular movies Three as one Addheaderview (Headview) into Refreshlistview
Three goodslistadapter:
Mgoodslistadapter = new Goodslistadapter (getactivity (), mgoodlist,headerviewscount); Mrefreshlistview.setadapter ( Mgoodslistadapter);
1.SimpleDraweeView achieve rounded picture
2. Free-of-reserve image display
<framelayout android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android:layout_centerInP Arent= "true" > <com.facebook.drawee.view.simpledraweeview android:id= "@+id/good_photo" android:layou T_width= "@dimen/good_image_width" android:layout_height= "@dimen/good_image_height" android:layertype= "Softwa Re "android:scaletype=" Centercrop "fresco:placeholderimage=" @mipmap/default_list_pic "/> <imageview Android:id= "@+id/good_icon" android:layout_width= "@dimen/good_image_width" android:layout_height= "@di Men/good_image_height "android:layertype=" Software "android:scaletype=" Centercrop "android:src=" @mipm Ap/pic_b "/> <imageview android:id=" @+id/good_appointment_img "android:layout_width=" Wrap_content " android:layout_height= "Wrap_content" android:layertype= "Software" android:scaletype= "CenterCrop" Android:src= "@mipmap/APpointment_img "/></framelayout>
Control is displayed in adapter
if (Mgoodlist.get (i). getis_appointment () = = 1) { holder.goodAppointmentImg.setVisibility (view.visible);} else { holder.goodAppointmentImg.setVisibility (view.gone);}
3. Existing price Add strikethrough
Holder.goodvalue = (TextView) Convertview.findviewbyid (r.id.good_tv_value); Holder.goodValue.getPaint (). SetFlags ( Paint.strike_thru_text_flag);//Add Strikethrough
GitHub Address: https://github.com/ganchuanpu/CoolShopping
Imitation handle buy app1--Home