先给大家展示下效果图,如果感觉还不错,请参考实例代码。
效果图如下所示:
具体代码如下所示:
<强> activity_detail.xml 强>
& lt; & # 63; xml version=" 1.0 " encoding=" utf - 8 " & # 63;比; & lt;使用 xmlns: android=" http://schemas.android.com/apk/res/android " xmlns:工具=" http://schemas.android.com/tools " xmlns:应用=" http://schemas.android.com/apk/res-auto " android: layout_width=" match_parent " android: layout_height=" match_parent " 工具:上下文=癱om.myxh.coolshopping.ui.activity.DetailActivity”比; & lt;使用 android: layout_width=" match_parent " android: layout_height=" match_parent " android: layout_above=癅 + id/detail_layout_buy”比; & lt; com.myxh.coolshopping.ui.widget.ObserverScrollView android: id=癅 + id/detail_scroll_view” android: layout_width=" match_parent " android: layout_height=癿atch_parent”比; LinearLayout & lt; android: layout_width=" match_parent " android: layout_height=" match_parent " 面向android:=按怪薄北? & lt; 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 " 应用:placeholderImage=" @mipmap/home_adver_320”/比; & lt;视图/比; LinearLayout & lt; android: layout_width=" match_parent " android: layout_height=" wrap_content " android:取向=按怪薄? android:填充=癅dimen/detail_product_info_layout_padding”比; & lt; TextView android: id=癅 + id/detail_tv_product_name” android: layout_width=" wrap_content " android: layout_height=" wrap_content " 工具:文本="竹林宾馆” android: textSize=" @dimen/textSize_20” 输入textColor=癅color/app_yellow”android:/比; LinearLayout & lt; android: layout_width=" match_parent " android: layout_height=" wrap_content " android: layout_marginTop=" 5 dp " android: layout_marginBottom=" 5 dp " android:重力=" center_vertical " 面向android:="水平"比; & lt; TextView android: id=癅 + id/detail_tv_description” android: layout_width=" 0 dp” android: layout_height=" wrap_content " android: layout_weight=" 1 " android: paddingRight=" 10 dp” 工具:文本="大床房入住一晚,交通便利” android: textSize=癅dimen/textSize_13”/比; & lt; TextView android: layout_width=" wrap_content " android: layout_height=" wrap_content " android:文本=" @string/detail_bought” android: textSize=癅dimen/textSize_14”/比; & lt; TextView android: id=癅 + id/detail_tv_bought” android: layout_width=" wrap_content " android: layout_height=" wrap_content " 工具:文本=" 289 " android: textSize=癅dimen/textSize_14”/比; & lt;/LinearLayout> & lt;视图 android: layout_marginTop=癅dimen/detail_view_marginTop”/比; LinearLayout & lt; android: layout_width=" match_parent " android: layout_height=" wrap_content " android: paddingTop=" 5 dp " android: paddingBottom=" 5 dp " 面向android:="水平" android:背景=" @color/白”比; LinearLayout & lt; android: id=癅 + id/detail_sure_layout_anytime” android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginRight=" @dimen/detail_sure_layout_marginRight” android:重力=" center_vertical " 面向android:="水平"比; & lt; ImageView android: layout_width=" @dimen/detail_sure_icon_width” android: layout_height=" @dimen/detail_sure_icon_height” android: src=" https://www.yisu.com/zixun/@mipmap mini_icon_sure "/比; & lt; TextView android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginLeft=" @dimen/detail_sure_text_marginLeft” android:文本=" @string/detail_sure_anytime” android: textSize=癅dimen/textSize_14”/比; & lt;/LinearLayout> LinearLayout & lt; android: id=癅 + id/detail_sure_layout_overdue” android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginRight=" @dimen/detail_sure_layout_marginRight” android:重力=" center_vertical " 面向android:="水平"比; & lt; ImageView android: layout_width=" @dimen/detail_sure_icon_width” android: layout_height=" @dimen/detail_sure_icon_height” android: src=" https://www.yisu.com/zixun/@mipmap mini_icon_sure "/比; & lt; TextView android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginLeft=" @dimen/detail_sure_text_marginLeft” android:文本=" @string/detail_sure_overdue” android: textSize=癅dimen/textSize_14”/比; & lt;/LinearLayout> LinearLayout & lt; android: id=癅 + id/detail_sure_layout_sevenday” android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginRight=" @dimen/detail_sure_layout_marginRight” android:重力=" center_vertical " 面向android:="水平"比; & lt; ImageView android: layout_width=" @dimen/detail_sure_icon_width” android: layout_height=" @dimen/detail_sure_icon_height” android: src=" https://www.yisu.com/zixun/@mipmap mini_icon_sure "/比; & lt; TextView android: layout_width=" wrap_content " android: layout_height=" wrap_content " android: layout_marginLeft=" @dimen/detail_sure_text_marginLeft” android:文本=" @string/detail_sure_sevenday” android: textSize=癅dimen/textSize_14”/比; & lt;/LinearLayout> null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null nullAndroid仿拉手网团购应用产品详情界面效果