仿拉手團購App9-- 產品詳情界面

来源:http://www.cnblogs.com/ganchuanpu/archive/2017/05/17/6869589.html
-Advertisement-
Play Games

activity_detail.xml 1.點擊收藏 2.社會化分享 ...


 

 

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"
    android: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.coolshopping.ui.widget.ObserverScrollView
            android:id="@+id/detail_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <LinearLayout
                android:layout_width="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_view_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/detail_tv_product_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        tools:text="竹林賓館"
                        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
                            android:id="@+id/detail_tv_description"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:paddingRight="10dp"
                            tools:text="大床房入住一晚,交通便利"
                            android:textSize="@dimen/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"
                            android: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">
                        <LinearLayout
                            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: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/detail_sure_text_marginLeft"
                                android:text="@string/detail_sure_anytime"
                                android:textSize="@dimen/textSize_14"/>
                        </LinearLayout>
                        <LinearLayout
                            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: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/detail_sure_text_marginLeft"
                                android:text="@string/detail_sure_overdue"
                                android:textSize="@dimen/textSize_14"/>
                        </LinearLayout>
                        <LinearLayout
                            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: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/detail_sure_text_marginLeft"
                                android:text="@string/detail_sure_sevenday"
                                android:textSize="@dimen/textSize_14"/>
                        </LinearLayout>
                    </LinearLayout>
                    <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:background="@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"/>
                        <View
                            style="@style/detail_view_style"
                            android:layout_marginTop="@dimen/detail_view_marginTop"/>
                        <TextView
                            android:id="@+id/detail_tv_merchant_title"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:padding="5dp"
                            tools:text="興鑫賓館"
                            android:textSize="@dimen/textSize_16"/>
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:padding="@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="湖北咸寧咸安區魚水路89號"/>
                                <TextView
                                    android:id="@+id/detail_merchant_tv_hours"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="5dp"
                                    tools:text="營業時間:24小時"/>
                                <TextView
                                    android:id="@+id/detail_merchant_tv_distance"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="5dp"
                                    tools:text="6.8km"/>
                            </LinearLayout>
                            <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>
                </LinearLayout>
                <include
                    android:id="@+id/detail_include_description"
                    layout="@layout/layout_detail_description"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
            </LinearLayout>
        </com.myxh.coolshopping.ui.widget.ObserverScrollView>
        <LinearLayout
            android:id="@+id/detail_title_layout"
            android:layout_width="match_parent"
            android: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_parent"
                android:src="@mipmap/icon_back_black"/>
            <TextView
                android:id="@+id/detail_title_tv_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_gravity="center"
                android:layout_marginEnd="@dimen/detail_title_tv_marginLR"
                android:layout_marginStart="@dimen/detail_title_tv_marginLR"
                android:gravity="center"
                tools:text="國際酒店"
                android:singleLine="true"
                android:ellipsize="end"
                android:textSize="@dimen/textSize_20"/>
            <ImageView
                android:id="@+id/detail_title_iv_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"/>
        </LinearLayout>
    </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="center"
            android:orientation="horizontal">
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android: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"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="$"
                        android:textSize="@dimen/textSize_14"
                        android:textColor="@color/app_yellow"
                        android:textStyle="bold"/>
                    <TextView
                        android:id="@+id/detail_layout_buy_price"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/detail_layout_buy_price_marginLeft"
                        tools:text="119"
                        android:textSize="@dimen/textSize_23"
                        android:textColor="@color/app_yellow"
                        android:textStyle="bold"/>
                </LinearLayout>
                <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/detail_layout_buy_value"
                        android:layout_width="wrap_content"
                        android:layout_height="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="@dimen/textSize_17"
                android:textColor="@color/white"
                android:background="@color/app_yellow"/>
        </LinearLayout>
    </RelativeLayout>

</RelativeLayout>

1.點擊收藏

2.社會化分享

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 1.什麼是全形和半形? 全形:是一種電腦字元,是指一個全形字元占用兩個標準字元(或兩個半形字元)的位置。全形占兩個位元組。 漢字字元和規定了全形的英文字元及國標GB2312-80中的圖形符號和特殊字元都是全形字元。在全形中,字母和數字等與漢字一樣占據著等寬的位置。 半形:是指一個字元占用一個標準的字元 ...
  • HTML: CSS: HTML: css: ...
  • 1,先搞個java jdk。我先用的1.7版本的,用cordova打包的時候各種報錯,應該是向下不相容吧。又換了個1.8版本。裝jdk一定要註意jdk跟jre不能都裝在目標文件夾的根目錄下,jdk跟jre在同一文件夾下會報錯。 2,裝完之後,要配置下環境變數,電腦→屬性→高級系統設置→高級→環境變 ...
  • 一,效果圖。 二,工程圖。 三,代碼。 AppDelegate.h AppDelegate.m ...
  • 一、我們先解釋一下他的含義: 1、Token的引入:Token是在客戶端頻繁向服務端請求數據,服務端頻繁的去資料庫查詢用戶名和密碼併進行對比,判斷用戶名和密碼正確與否,並作出相應提示,在這樣的背景下,Token便應運而生。 2、Token的定義:Token是服務端生成的一串字元串,以作客戶端進行請求 ...
  • 首先,需要一個電話號碼,目前很多賬戶都是將賬戶名設置成手機號,然後點擊按鈕獲取手機驗證碼。 其次,你需要後臺給你手機簡訊的驗證介面,各個公司用的不一樣,這個身為前端,不需要你來考慮,你只要讓你後臺給你寫好介面,你直接調用就好了。 activity_login.xml LoginActivity.ja ...
  • 1.阿裡巴巴的熱修複框架(AndFix) 1 . 添加依賴2. 儘可能早的載入補丁3. 修複bug,生成沒有bug的apk文件4. 對比新舊apk生成.apatch補丁文件5. 載入新補丁,修複bug http://blog.csdn.net/qq_17250009/article/details/ ...
  • activity_collect.xml ...
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...