parent
38b1435bd3
commit
1072a3625b
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
package com.example.register;
|
||||
package com.example.register.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.FragmentTransaction;
|
@ -1,18 +1,16 @@
|
||||
package com.example.register;
|
||||
package com.example.register.activity;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.app.Activity;
|
||||
|
||||
import com.example.register.CategoryActivity;
|
||||
import com.example.register.R;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class userActivity extends AppCompatActivity implements View.OnClickListener{
|
||||
EditText username,sex,city;
|
@ -0,0 +1,78 @@
|
||||
package com.example.register.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.register.R;
|
||||
import com.example.register.entity.Condition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ListViewAdapter extends BaseAdapter {
|
||||
private List<Condition> conditionList;
|
||||
private LayoutInflater layoutInflater;
|
||||
private int selectedPosition = -1;
|
||||
private int selectColor = Color.GRAY;
|
||||
|
||||
public ListViewAdapter(Context context, List<Condition> conditionList) {
|
||||
this.conditionList = conditionList;
|
||||
this.layoutInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return conditionList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return conditionList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder viewHolder;
|
||||
if (convertView == null) {
|
||||
convertView = layoutInflater.inflate(R.layout.product_condition_item, null);
|
||||
viewHolder = new ViewHolder();
|
||||
viewHolder.imageView = convertView.findViewById(R.id.condition_icon);
|
||||
viewHolder.jiange = convertView.findViewById(R.id.image_jiange);
|
||||
viewHolder.textView = convertView.findViewById(R.id.condition_name);
|
||||
viewHolder.linearLayout = convertView.findViewById(R.id.item_bg);
|
||||
convertView.setTag(viewHolder);
|
||||
} else {
|
||||
viewHolder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
Condition condition = conditionList.get(position);
|
||||
if (condition != null) {
|
||||
viewHolder.imageView.setBackgroundResource(condition.getConditionIcon());
|
||||
viewHolder.textView.setText(condition.getConditionName());
|
||||
viewHolder.jiange.setBackgroundColor(Color.rgb(207, 207, 207));
|
||||
if (selectedPosition == position) {
|
||||
viewHolder.linearLayout.setBackgroundColor(selectColor);
|
||||
}
|
||||
|
||||
}
|
||||
return convertView;
|
||||
}
|
||||
|
||||
class ViewHolder {
|
||||
ImageView imageView, jiange;
|
||||
TextView textView;
|
||||
LinearLayout linearLayout;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.example.register.entity;
|
||||
|
||||
public class Condition {
|
||||
private Integer conditionIcon;
|
||||
private String conditionName;
|
||||
|
||||
public Integer getConditionIcon() {
|
||||
return conditionIcon;
|
||||
}
|
||||
|
||||
public void setConditionIcon(Integer conditionIcon) {
|
||||
this.conditionIcon = conditionIcon;
|
||||
}
|
||||
|
||||
public String getConditionName() {
|
||||
return conditionName;
|
||||
}
|
||||
|
||||
public void setConditionName(String conditionName) {
|
||||
this.conditionName = conditionName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Condition{" +
|
||||
"conditionIcon=" + conditionIcon +
|
||||
", conditionName='" + conditionName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.example.register.entity;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
public class OrangeMessage {
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Timestamp getSendTime() {
|
||||
return sendTime;
|
||||
}
|
||||
|
||||
public void setSendTime(Timestamp sendTime) {
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public String getUsed() {
|
||||
return used;
|
||||
}
|
||||
|
||||
public void setUsed(String used) {
|
||||
this.used = used;
|
||||
}
|
||||
|
||||
private Integer id;
|
||||
private String content;
|
||||
private Timestamp sendTime;
|
||||
private String used;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrangeMessage{" +
|
||||
"id=" + id +
|
||||
", content='" + content + '\'' +
|
||||
", sendTime=" + sendTime +
|
||||
", used='" + used + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.example.register.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
public class OrangeProduct {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private BigDecimal price;
|
||||
private String imgUrl;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrangeProduct{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", price=" + price +
|
||||
", imgUrl='" + imgUrl + '\'' +
|
||||
", addTime=" + addTime +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Timestamp getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Timestamp addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
private Timestamp addTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.example.register.entity;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
public class OrangeProductPack {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Timestamp addTime;
|
||||
private Bitmap imgBitmap;
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrangeProductPack{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", addTime=" + addTime +
|
||||
", imgBitmap=" + imgBitmap +
|
||||
", price=" + price +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Timestamp getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Timestamp addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public Bitmap getImgBitmap() {
|
||||
return imgBitmap;
|
||||
}
|
||||
|
||||
public void setImgBitmap(Bitmap imgBitmap) {
|
||||
this.imgBitmap = imgBitmap;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.example.register.entity;
|
||||
|
||||
public class ShoppingCart {
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getProductId() {
|
||||
return ProductId;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
ProductId = productId;
|
||||
}
|
||||
|
||||
public Integer getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Integer number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private Integer ProductId;
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
private Integer number;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.example.register;
|
||||
package com.example.register.entity;
|
||||
|
||||
public class User {
|
||||
private String username;
|
@ -0,0 +1,80 @@
|
||||
package com.example.register.netrequest;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.example.orangesale_end.entity.OrangeProduct;
|
||||
import com.example.orangesale_end.entity.OrangeProductPack;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class OkHttpClientProduct {
|
||||
|
||||
/**
|
||||
* 查询商品信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<OrangeProduct> getProduct() throws IOException {
|
||||
OkHttpClient okHttpClient = new OkHttpClient();
|
||||
Request request = new Request.Builder()
|
||||
.url("http://192.168.43.115:8081/orange/product/search")
|
||||
.build();
|
||||
Response response = okHttpClient.newCall(request).execute();
|
||||
JSONObject jsonObject = JSON.parseObject(Objects.requireNonNull(response.body()).string());
|
||||
List<OrangeProduct> list = JSON.parseObject(jsonObject.getString("data"), new TypeReference<List<OrangeProduct>>() {
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片
|
||||
*
|
||||
* @param imgUrl
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public Bitmap getImageBitMap(String imgUrl) throws IOException {
|
||||
Bitmap bitmap;
|
||||
OkHttpClient okHttpClient = new OkHttpClient();
|
||||
Request request = new Request.Builder()
|
||||
.url(imgUrl)
|
||||
.build();
|
||||
Response response = okHttpClient.newCall(request).execute();
|
||||
byte[] bytes = Objects.requireNonNull(response.body()).bytes();
|
||||
bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
|
||||
return bitmap;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装信息
|
||||
*
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
|
||||
public List<OrangeProductPack> getProductPack() throws IOException {
|
||||
List<OrangeProductPack> packList = new ArrayList<>();
|
||||
List<OrangeProduct> list = getProduct();
|
||||
for (OrangeProduct orangeProduct : list) {
|
||||
OrangeProductPack orangeProductPack = new OrangeProductPack();
|
||||
orangeProductPack.setId(orangeProduct.getId());
|
||||
orangeProductPack.setImgBitmap(getImageBitMap(orangeProduct.getImgUrl()));
|
||||
orangeProductPack.setAddTime(orangeProduct.getAddTime());
|
||||
orangeProductPack.setPrice(orangeProduct.getPrice());
|
||||
packList.add(orangeProductPack);
|
||||
}
|
||||
return packList;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.example.register.netrequest;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.orangesale_end.entity.OrangeUser;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class OkHttpUser {
|
||||
/**
|
||||
* 用户登录验证
|
||||
*
|
||||
* @param orangeUser
|
||||
*/
|
||||
public OrangeUser userLogin(OrangeUser orangeUser) throws IOException {
|
||||
OkHttpClient okHttpClient= new OkHttpClient();
|
||||
//数据类型为json格式
|
||||
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
|
||||
//将对象转为JSON字符串
|
||||
String jsonStr = JSONObject.toJSONString(orangeUser);
|
||||
|
||||
RequestBody requestBody = RequestBody.create(jsonStr, mediaType);
|
||||
Request request = new Request.Builder()
|
||||
.url("http://192.168.43.115:8081/orange/user/login")
|
||||
.post(requestBody)
|
||||
.build();
|
||||
|
||||
Response response = okHttpClient.newCall(request).execute();
|
||||
|
||||
String responseStr = response.body().string();
|
||||
System.out.println("responseStr = " + responseStr);
|
||||
JSONObject jsonObject = JSON.parseObject(responseStr);
|
||||
JSONObject jsonObject1 = jsonObject.getJSONObject("data");
|
||||
OrangeUser orangeUser1 = JSON.toJavaObject(jsonObject1, OrangeUser.class);
|
||||
return orangeUser1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户注册
|
||||
*
|
||||
* @param orangeUser
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public boolean userRegister(OrangeUser orangeUser) throws IOException {
|
||||
OkHttpClient okHttpClient = new OkHttpClient();
|
||||
//数据类型为json格式
|
||||
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
|
||||
//将对象转为JSON字符串
|
||||
String jsonStr = JSONObject.toJSONString(orangeUser);
|
||||
RequestBody requestBody = RequestBody.create(jsonStr, mediaType);
|
||||
Request request = new Request.Builder()
|
||||
.url("http://192.168.43.115:8081/orange/user/register")
|
||||
.post(requestBody)
|
||||
.build();
|
||||
Response response = okHttpClient.newCall(request).execute();
|
||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||
Log.i("register", "userRegister: "+jsonObject);
|
||||
return jsonObject.getBoolean("flag");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?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">
|
||||
|
||||
<include layout="@layout/shoppingcart_title" />
|
||||
<!--有商品时的布局-->
|
||||
<GridView
|
||||
android:id="@+id/cart_productList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:numColumns="1" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,45 @@
|
||||
<?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="#F2F2F2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/shoppingcart_title" />
|
||||
<!--无商品时的布局-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="160dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/cart" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="Cart is Empty ~"
|
||||
android:textColor="#B5B5B5"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/random_search"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/button_login"
|
||||
android:text="go shopping..."
|
||||
android:textColor="#fff"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,33 @@
|
||||
<?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="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!--标题-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#EFB81C"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/category_return"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_left" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="商品"
|
||||
android:layout_marginRight="40dp"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,234 @@
|
||||
<?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="#E8E8E8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/user_icon" />
|
||||
|
||||
<!--卡券-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_pay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="40dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_pay"
|
||||
android:textColor="#000"
|
||||
android:text="卡券"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--账号-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_username_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_username"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_account"
|
||||
android:textColor="#000"
|
||||
android:text="账号:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--性别-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_sex_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="1dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_sex"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:drawableLeft="@drawable/user_sex"
|
||||
android:textColor="#000"
|
||||
android:text="性别:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--城市-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_city_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="1dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_city"
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/city"
|
||||
android:textColor="#000"
|
||||
android:text="城市:"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--通用-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_general"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/user_general"
|
||||
android:textColor="#000"
|
||||
android:text="通用"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <!–查看商品–>
|
||||
<LinearLayout
|
||||
android:id="@+id/user_searchProduct"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:textColor="#000"
|
||||
android:text="查看消息"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>-->
|
||||
|
||||
<!--设置-->
|
||||
<LinearLayout
|
||||
android:id="@+id/user_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/setting"
|
||||
android:textColor="#000"
|
||||
android:text="设置"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:text="退出登录"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/button_login"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/item_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="#fff"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/condition_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/condition_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="销量"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_jiange"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:background="#CFCFCF" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,12 @@
|
||||
<?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="#F2F2F2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/shoppingcart_title" />
|
||||
|
||||
<include layout="@layout/cart_no_product" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,32 @@
|
||||
<?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="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!--标题-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#EFB81C"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/shopcart_return"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/arrow_left" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="shopping cart"
|
||||
android:layout_marginRight="40dp"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in new issue