布局二级购物车
来源:互联网 发布:漫步者s1000 知乎 编辑:程序博客网 时间:2024/06/06 09: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:orientation="vertical"> <ExpandableListView android:id="@+id/elv" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:childIndicator="@null" android:groupIndicator="@null" > </ExpandableListView> <LinearLayout android:layout_width="match_parent" android:layout_height="50dp" android:gravity="center_vertical" android:orientation="horizontal" > <CheckBox android:id="@+id/all_chekbox" android:layout_marginLeft="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="全选"/> <LinearLayout android:id="@+id/ll_info" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="4" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginRight="20dp" android:layout_weight="1" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="right" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="合计:" android:textSize="18sp" android:textStyle="bold" /> <TextView android:id="@+id/total_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="¥0.00" android:textColor="#f23232" android:textSize="16sp" android:textStyle="bold" /> </LinearLayout> <TextView android:id="@+id/total_number" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="共有商品:0件" android:gravity="right" android:textSize="16sp" android:textStyle="bold" /> </LinearLayout> <TextView android:id="@+id/tv_go_to_pay" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="3" android:background="#fd7a05" android:clickable="true" android:gravity="center" android:text="结算" android:textColor="#FAFAFA" /> </LinearLayout> </LinearLayout></LinearLayout>
//父布局
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="match_parent"> <CheckBox android:id="@+id/group_checkbox" android:layout_marginLeft="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="false"/> <TextView android:id="@+id/shop_name" android:layout_marginLeft="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16dp" /></LinearLayout>
//子布局
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="match_parent"> <CheckBox android:id="@+id/child_checkbox" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:orientation="vertical" android:layout_weight="9"> <TextView android:id="@+id/shop_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="17dp" android:layout_marginStart="17dp" android:text="TextView" /> <LinearLayout android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="match_parent"> <ImageView android:id="@+id/shop_img" android:layout_width="90dp" android:layout_height="90dp" android:layout_marginTop="30dp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/shop_price" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:gravity="center" android:textSize="25dp" android:text="¥20" android:textColor="#f23232" /> <com.example.gshopping.AddDeleteView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/adddeleteview" android:gravity="center"></com.example.gshopping.AddDeleteView> </LinearLayout> </LinearLayout> </LinearLayout></LinearLayout>
//自定义View
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="match_parent"> <TextView android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:text="减" android:gravity="center" android:textSize="20dp" android:id="@+id/txt_delete" /> <TextView android:layout_width="0dp" android:layout_height="match_parent" android:id="@+id/et_number" android:layout_weight="3" android:gravity="center" android:textSize="20dp" android:text="1" /> <TextView android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:text="加" android:gravity="center" android:id="@+id/txt_add" android:textSize="20dp" /></LinearLayout>
阅读全文
0 0
- 布局二级购物车
- 二级购物车布局
- 二级列表+购物车布局
- Android二级列表仿购物车布局
- 二级购物车新的布局
- Android二级购物车MVP实现(布局篇)
- MVP二级购物车布局和简单逻辑
- 二级列表购物车
- 购物车二级列表
- 购物车二级
- 购物车(二级列表)
- 二级购物车
- 二级购物车
- 二级列表购物车
- 购物车二级列表
- 二级购物车ShoppingCart
- 二级购物车
- 二级购物车完整版
- Java集合框架08--Hashtable和源码分析
- 机器学习从零开始系列连载(1)——基本概念
- 动态的定位圆圈。
- Spring Cloud构建微服务架构Hystrix监控面板
- SpringBoot学习记录二、基本使用
- 布局二级购物车
- 加接口的AsyncTask工具类
- 从0到1 | 0基础/转行如何用3个月搞定机器学习
- Linux下Tomcat开机自动启动 原创 2014年07月18日 12:32:49 标签:Linux /tomcat /shell /启动 22095 Linux下tomcat开机自动启动有两种方法
- 【代码笔记】iOS-自定义loading(IanAlert)
- [转] Ubuntu 16.04 U盘安装图文教程
- 使用Python语言完成SVM实现分类
- Vue.js的几个简单属性方法
- JavaScript之类型判断