Activity_detail.xml
<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "xmlns:tools=" Http://schemas.android.com/tools "xmlns:app=" Http://schemas.android.com/apk/res-auto "Andro Id:layout_width= "Match_parent" android:layout_height= "Match_parent" tools:context= " Com.myxh.coolshopping.ui.activity.DetailActivity "> <relativelayout android:layout_width=" match_parent " android:layout_height= "Match_parent" android:layout_above= "@+id/detail_layout_buy" > <com.myxh.cool Shopping.ui.widget.ObserverScrollView android:id= "@+id/detail_scroll_view" Android:layout_width= "mat Ch_parent "android:layout_height=" match_parent "> <linearlayout android:layout_w Idth= "Match_parent" android:layout_height= "match_parent" android:orientation= "vertical" > <com.facebook.drawee.view.simpledraweeview Android:id= "@+id/detail_product_photo" android:layout_width= "Match_parent" android:layout_height= "@dimen/detail_photo_height" android:scaletype= "Centercrop" App:placeholderimage= "@mipmap/home_adver_320"/> <view style= "@style/detail_v Iew_style "/> <linearlayout android:layout_width=" Match_parent " android:layout_height= "wrap_content" android:orientation= "vertical" android:padding= "@dimen/detail_product_info_layout_padding" > <textview android:id= "@+id/de Tail_tv_product_name "android:layout_width=" Wrap_content "Android:layout_hei ght= "wrap_content" tools:text= "Bamboo Grove Hotel" android:textsize= "@dimen/textsize_20" AnDroid:textcolor= "@color/app_yellow"/> <linearlayout android:layout_width= " Match_parent "android:layout_height=" Wrap_content "android:layout_margintop= "5DP" android:layout_marginbottom= "5DP" android:gravity= "center_vertical" android:orientation= "Horizontal" > <textview a Ndroid:id= "@+id/detail_tv_description" android:layout_width= "0DP" an droid:layout_height= "Wrap_content" android:layout_weight= "1" Android :p addingright= "10DP" tools:text= "big bed room stay one night, convenient transportation" android:textsize= "@di Men/textsize_13 "/> <textview android:layout_width=" Wrap_content " android:layout_height= "Wrap_content" android:text= "@string/detail_bought" Android:textsize= "@dimen/textsize_14"/> <textview android: Id= "@+id/detail_tv_bought" android:layout_width= "Wrap_content" Andro id:layout_height= "Wrap_content" tools:text= "289" android:textsize= "@ Dimen/textsize_14 "/> </LinearLayout> <view style= "@style/detail_view_style" android:layout_margintop= "@dimen/detail_view_margintop"/> <linearlayout android:layout_width= "Match_parent" Android:layout_ height= "Wrap_content" android:paddingtop= "5DP" android:paddingbottom= "5DP" Android:orientation= "Horizontal" android:background= "@color/white" > <lin Earlayout android:id= "@+id/detail_sure_layout_anytime" android:layou T_width= "Wrap_content" android:layout_height= "Wrap_content" Android: layout_marginright= "@dimen/detail_sure_layout_marginright" android:gravity= "center_vertical" android:orientation= "Horizontal" > <imageview Android:layout_width= "@dimen/detail_sure_icon_width" android:layout_height= "@di Men/detail_sure_icon_height "android:src=" @mipmap/mini_icon_sure "/> <textview android:layout_width= "Wrap_content" Android Oid:layout_height= "Wrap_Content "android:layout_marginleft=" @dimen/detail_sure_text_marginleft " android:text= "@string/detail_sure_anytime" android:textsize= "@dimen/textsize_14 "/> </LinearLayout> <linearlayout and Roid:id= "@+id/detail_sure_layout_overdue" android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_marginright= "@dimen/detail_sure_l Ayout_marginright "android:gravity=" center_vertical "Android:orienta tion= "Horizontal" > <imageview android:layout_width= "@dimen /detail_sure_icon_width "android:layout_height=" @dimen/detail_sure_icon_height " Androidoid:src= "@mipmap/mini_icon_sure"/> <textview android:layou T_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_marginleft= "@dimen/detail_sure_text_marginleft" android:text= "@string/detail _sure_overdue "android:textsize=" @dimen/textsize_14 "/> </linea rlayout> <linearlayout android:id= "@+id/detail_sure_layout_sevenda Y "android:layout_width=" wrap_content "android:layout_height=" Wrap_c Ontent "android:layout_marginright=" @dimen/detail_sure_layout_marginright " Android:gravity= "center_vertical" android:orientation= "Horizontal" > <imageview Android:layout_width= "@dimen/detail_sure_icon_width" Android : layout_height= "@dimen/detail_sure_icon_height" android:src= "@mipmap/mini_icon_sure"/> <textview android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_marginleft= "@dimen/detai L_sure_text_marginleft "android:text=" @string/detail_sure_sevenday " Android:textsize= "@dimen/textsize_14"/> </LinearLayout> </li nearlayout> <view style= "@style/detail_view_style"/> <linearlayout android:layout_width= "Match_parent" android:layout_height= "Wrap_content" android:layout_margintop= "@dimen/detail_merchant_info_layout_margintop" android:backg round= "@color/white" android:orientation= "vertical" > <textview Android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:text= "@string/detail_merchant_info" android:textcolor= "@color/ Detail_merchant_info_color "android:textsize=" @dimen/textsize_17 "/> & Lt View style= "@style/detail_view_style" android:layout_margintop= "@dim En/detail_view_margintop "/> <textview android:id=" @+id/detail_tv_m Erchant_title "android:layout_width=" Wrap_content "android:layout_he ight= "Wrap_content" android:padding= "5DP" tools:text= "Xing Xin Hotel" an Droid:textsize= "@dimen/textsize_16"/> <linearlayout android:layout _width= "Match_parent" android:layout_height= "Wrap_content" android:p adding= "@dimen/detail_merchant_detail_layout_padding" android:orientation= "Horizontal" > <linearlayout android:layout_width= "0DP" android:layout_height= "Wrap_content" android:layout_weight= "3" android:orientation= "Vertical" > <textview Android:id= "@+id/detail_merchant_tv_address" android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" tools:text= "Hubei xianning Xianan District Fish Road No. 89th"/> <textview android:id= "@+id/detail_merchant_tv_hours" Android:layout_width= "wrap_content" android:layout_height= "wrap _content "android:layout_margintop=" 5DP "tools:text= "Business Hours: 24 hours"/> <textview android:id= "@+id/detail_me Rchant_tv_distance "android:layout_width=" Wrap_content " android:layout_height= "Wrap_content" android:layout_margintop= "5DP" tools:text= "6.8km"/> </LinearLayout> &l T View Android:layout_width= "1DP" android:layout_height= "Match_parent" android:background= "@mipmap/line_divide_vertical"/> <imageview Android:id= "@+id/detail_merchant_iv_call" android:layout_width= "0DP" android:layout_height= "Wrap_content" android:layout_weight= "1" android:layout_gravity= "center" android:src= "@mipmap/ic_ Call "/> </LinearLayout> </LinearLayout> </linea rlayout> <include android:id= "@+id/detail_include_description" layout= "@layout/layout_detail_description" android:layout_width= "Match_parent" Andro Id:layout_height= "Wrap_cOntent "/> </LinearLayout> </com.myxh.coolshopping.ui.widget.ObserverScrollView> &L T LinearLayout android:id= "@+id/detail_title_layout" android:layout_width= "Match_parent" an droid:layout_height= "45DP" android:orientation= "Horizontal" android:layout_alignparenttop= "true" android:padding= "@dimen/detail_title_layout_padding" > <imageview android:id= "@+id/ Detail_title_iv_back "android:layout_width=" wrap_content "android:layout_height=" Match_paren T "android:src=" @mipmap/icon_back_black "/> <textview android:id=" @+id/detai L_title_tv_title "android:layout_width=" 0DP "android:layout_height=" Wrap_content " android:layout_weight= "1" android:layout_gravity= "center" android:layout_marginend= "@di Men/detail_title_tv_maRGINLR "android:layout_marginstart=" @dimen/detail_title_tv_marginlr "android:gravity=" center "Tools:text=" International Hotel "android:singleline=" true "android:ellipsize=" End " Android:textsize= "@dimen/textsize_20"/> <imageview android:id= "@+id/detail_title_i V_favorite "android:layout_toleftof=" @+id/detail_title_iv_share "android:layout_marginright= "5DP" android:layout_width= "wrap_content" android:layout_height= "Match_parent" android:src= "@mipmap/icon_uncollect_black"/> <imageview android:id= "@+id/detail_title_iv _share "android:layout_width=" wrap_content "android:layout_height=" Match_parent " Android:layout_alignparentright= "true" android:src= "@mipmap/icon_share_black"/> </linearla Yout> </relativelayout> <relativelayout android:id= "@+id/detail_layout_buy" android:layout_width= "Match_parent" android:layout_height= "@dimen/detail_layout_buy_height" android:layout_alignparentbottom= "true" Android : background= "@color/white" > <view style= "@style/detail_view_style"/> <linearlayout Android:layout_width= "Match_parent" android:layout_height= "Match_parent" android:gravity= "C Enter "android:orientation=" horizontal "> <linearlayout android:layout_width=" 0d P "android:layout_height=" Match_parent "android:gravity=" center_vertical "and roid:layout_weight= "1" android:orientation= "Horizontal" > <linearlayout Android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" Android : orientation= "Horizontal"> <textview android:layout_width=" wrap_content "an droid:layout_height= "Wrap_content" android:layout_marginleft= "15DP" Android: Text= "$" android:textsize= "@dimen/textsize_14" android:textcolor= "@color/app _yellow "android:textstyle=" bold "/> <textview Andro Id:id= "@+id/detail_layout_buy_price" android:layout_width= "Wrap_content" and roid:layout_height= "Wrap_content" android:layout_marginleft= "@dimen/detail_layout_buy_price_marginl EFT "tools:text=" 119 "android:textsize=" @dimen/textsize_23 " Android:textcolor= "@color/app_yellow" android:textstyle= "bold"/> </line Arlayout> <linearlayout android:layout_width= "wrap_content" android:layout_height= "wrap _content "android:layout_gravity=" center "android:layout_marginleft=" 15DP " android:orientation= "vertical" > <textview android:id= "@+id/detai L_layout_buy_value "android:layout_width=" Wrap_content "Android:layout_heigh t= "Wrap_content" tools:text= "$998" android:textsize= "@dimen/textsize_12"/> ; <textview android:layout_width= "wrap_content" android:layout_height= "wrap _content "android:text=" @string/detail_bottom_retail_price "android:textsize = "@dimen/textsize_12"/> </LinearLayout> </LinearLayout> <button Android:id= "@+id/detail_layout_buy_btn" android:layout_width= "Wrap_content" Android : layout_height= "match_parent" android:text= "@string/detail_bottom_buy" android:textsize= "@di Men/textsize_17 "android:textcolor=" @color/white "android:background=" @color/app_yellow "/> ; </LinearLayout> </RelativeLayout></RelativeLayout>
1. Click Favorites
2. Social sharing
Imitation handle Purchase app9--product detail interface