Android 仿淘宝属性标签页

直接看效果图相信这样的效果很多,我之前在网上找了很久没找到自己想要的!

这里写图片描述

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:zhy="http://schemas.android.com/apk/res-auto"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="150dp"
        zhy:srcCompat="@drawable/ic_big_medical"
        android:scaleType="fitXY"
        android:id="@+id/imageView"
        />
    <RelativeLayout
        android:layout_marginTop="130dp"
        android:layout_width="wrap_content"

        android:layout_height="wrap_content">


        <ImageView
            android:id="@+id/iv_image"
            android:layout_width="80dp"
            android:layout_height="80dp"
            zhy:srcCompat="@drawable/ic_small_medical"
            android:layout_marginLeft="20dp"
            android:scaleType="fitXY"
            />
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="15dp"
            android:layout_toRightOf="@id/iv_image"
            android:orientation="vertical">
            <TextView

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@android:color/holo_orange_light"

                android:text="¥25.0"/>
            <TextView
                android:layout_toRightOf="@id/iv_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000"
                android:layout_centerVertical="true"
                android:text="库存100件"/>
            <TextView
                android:layout_toRightOf="@id/iv_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000"
                android:layout_centerVertical="true"
                android:text="选择药品规格"/>

        </LinearLayout>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="#000"
            android:layout_marginTop="120dp"
            android:layout_marginLeft="16dp"
            android:text="药品规格"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:orientation="horizontal">

        <com.zhy.view.flowlayout.TagFlowLayout
            android:id="@+id/flowlayout2"
            android:layout_width="wrap_content"
            android:layout_marginTop="130dp"
            zhy:max_select="-1"
            zhy:theme="@style/AlertDialog.AppCompat.Light"
            zhy:gravity="center"
            android:layout_height="wrap_content" />

        </LinearLayout>
    </RelativeLayout>

    <!--<com.visoport.medicine.view.AmountView-->
        <!--android:id="@+id/amount_view"-->
        <!--android:layout_width="wrap_content"-->
        <!--android:layout_height="36dp"-->
        <!--android:layout_centerInParent="true"-->
        <!--android:layout_gravity="right"-->
        <!--android:layout_marginRight="15dp"-->
        <!--zhy:btnTextSize="14sp"-->
        <!--zhy:btnWidth="36dp"-->
        <!--zhy:tvWidth="50dp"/>-->
    <!--<LinearLayout-->
        <!--android:layout_width="wrap_content"-->
        <!--android:layout_height="wrap_content"-->
        <!--android:focusable="true"-->
        <!--android:layout_marginTop="360dp"-->
        <!--android:layout_marginLeft="20dp"-->
        <!--android:layout_marginRight="20dp"-->
        <!--android:divider="@drawable/divider"-->
        <!--android:background="@drawable/bg_amount_layout"-->
        <!--android:showDividers="middle"-->
        <!--android:orientation="horizontal">-->

        <!--<TextView-->
            <!--android:layout_width="28dp"-->
            <!--android:layout_height="wrap_content"-->
            <!--android:text="购买数量"/>-->


        <!--<Button-->
            <!--android:id="@+id/btnDecrease"-->
            <!--android:layout_width="0dp"-->
            <!--android:layout_height="match_parent"-->
            <!--android:layout_weight="1"-->
            <!--android:gravity="center"-->
            <!--android:background="@drawable/btn_amount"-->
            <!--android:text="-"/>-->

        <!--<EditText-->
            <!--android:id="@+id/etAmount"-->
            <!--android:layout_width="0dp"-->
            <!--android:layout_height="match_parent"-->
            <!--android:minWidth="60dp"-->
            <!--android:layout_weight="2"-->
            <!--android:background="@null"-->
            <!--android:inputType="number"-->
            <!--android:gravity="center"-->
            <!--android:text="1"/>-->

        <!--<Button-->
            <!--android:id="@+id/btnIncrease"-->
            <!--android:layout_width="0dp"-->
            <!--android:layout_height="match_parent"-->
            <!--android:layout_weight="1"-->
            <!--android:gravity="center"-->
            <!--android:background="@drawable/btn_amount"-->
            <!--android:text="+"/>-->
    <!--</LinearLayout>-->

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="bottom"
        android:layout_marginTop="450dp"
        android:weightSum="2">
        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#ff6633"
            android:textColor="#ffffff"
            android:text="加入購物車"/>
        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#e64514"
            android:textColor="#fffff0"
            android:text="立即購買"/>

    </LinearLayout>

</FrameLayout>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值