listview 购物车布局

叨叨的蚂蚁 2013-12-16 10:50:47



android开发,求一个类似的UI布局~~~!!
...全文
164 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Clare_0_0 2013-12-17
  • 打赏
  • 举报
回复
得有多难啊.......代码给你,控件的位置你自己再调一下
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#4095ef" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="账户余额:"
                    android:textColor="#FFFFFF" />

                <TextView
                    android:id="@+id/account_left"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/details_img1" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="合计金额:"
                    android:textColor="#FFFFFF" />

                <TextView
                    android:id="@+id/items_counts"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <TextView
                    android:id="@+id/shopping_card"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_weight="1" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@drawable/icons_1"
                    android:text="清空购物车" />

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@drawable/icons_2"
                    android:text="提交订单" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:background="#4095ef" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="商品信息" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="订购量" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="金额" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="删除" />
    </LinearLayout>

</LinearLayout>
叨叨的蚂蚁 2013-12-17
  • 打赏
  • 举报
回复
引用 4 楼 u012476249 的回复:
得有多难啊.......代码给你,控件的位置你自己再调一下
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#4095ef" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="账户余额:"
                    android:textColor="#FFFFFF" />

                <TextView
                    android:id="@+id/account_left"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/details_img1" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="合计金额:"
                    android:textColor="#FFFFFF" />

                <TextView
                    android:id="@+id/items_counts"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1" >

                <TextView
                    android:id="@+id/shopping_card"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_weight="1" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@drawable/icons_1"
                    android:text="清空购物车" />

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@drawable/icons_2"
                    android:text="提交订单" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:background="#4095ef" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="商品信息" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="订购量" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="金额" />
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="删除" />
    </LinearLayout>

</LinearLayout>
非常感谢~~~
triplesky001 2013-12-16
  • 打赏
  • 举报
回复
分数低了不然,给你写一个
Birds2018 2013-12-16
  • 打赏
  • 举报
回复
左边一个ImageView 然后右边一个LinearLayout包括上面的title和下面的详细商品布局。 再右边价格,再右边一个ImageView 整个外面套一层RelativeLayout
叨叨的蚂蚁 2013-12-16
  • 打赏
  • 举报
回复
引用 2 楼 lulong1985 的回复:
分数低了不然,给你写一个




这样的整体布局能弄不~~ 分都给你喽。。。。 ~~~ 发帖那个布局我弄好了 整体不太会~~~

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧