diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index e9dc395..79c3098 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -18,6 +18,7 @@
+
\ No newline at end of file
diff --git a/main/java/com/orangesale/cn/MainActivity.java b/main/java/com/orangesale/cn/MainActivity.java
index 3fe3d12..25ed3e8 100644
--- a/main/java/com/orangesale/cn/MainActivity.java
+++ b/main/java/com/orangesale/cn/MainActivity.java
@@ -11,7 +11,7 @@ import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
-import com.orangesale.cn.activity.CategoryActivity;
+import com.orangesale.cn.activity.IndexActivity;
import com.orangesale.cn.activity.RegisterActivity;
import com.orangesale.cn.dataoperation.OrangeDatabase;
@@ -36,7 +36,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
case R.id.login:
//注册时,我们引入了数据库,登录这里可以通过数据库进行验证,验证跳转到首页,不通过进行提示
if (validateLogin()) {
- Intent intent1 = new Intent(MainActivity.this, CategoryActivity.class);
+ Intent intent1 = new Intent(MainActivity.this, IndexActivity.class);
Bundle bundle = new Bundle();
OrangeDatabase orangeDatabase = new OrangeDatabase(MainActivity.this);
bundle.putString("username", usernameText.getText().toString());
@@ -70,7 +70,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
String password = paswdEdit.getText().toString();
OrangeDatabase orangeDatabase = new OrangeDatabase(MainActivity.this);
SQLiteDatabase sqLiteDatabase = orangeDatabase.getReadableDatabase();
- Cursor cursor = sqLiteDatabase.rawQuery("select * from user where username=? and password=?", new String[]{username, password});
+ Cursor cursor = sqLiteDatabase.rawQuery("select * from orange_user where username=? and password=?", new String[]{username, password});
if (cursor.getCount() > 0) {
return true;
}
diff --git a/main/java/com/orangesale/cn/activity/CategoryActivity.java b/main/java/com/orangesale/cn/activity/CategoryActivity.java
index 00227c2..af5b6bc 100644
--- a/main/java/com/orangesale/cn/activity/CategoryActivity.java
+++ b/main/java/com/orangesale/cn/activity/CategoryActivity.java
@@ -13,6 +13,7 @@ import com.orangesale.cn.adapter.Adapter;
import com.orangesale.cn.entity.Product;
import com.orangesale.cn.fragment.SetDetailFragment;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -58,30 +59,24 @@ public class CategoryActivity extends Activity {
*/
private void initData() {
productList = new ArrayList<>();
- productCategory.add("葡萄");
- productCategory.add("青枣");
- productCategory.add("西瓜");
- productCategory.add("草莓");
+ productCategory.add("橘子");
+ productCategory.add("橙子");
+ productCategory.add("柚子");
Product product = new Product();
- product.setImageUrlId(R.drawable.putao);
- product.setProductName("葡萄");
- product.setProductPrice("¥9.9/斤");
+ product.setImageUrlId(R.drawable.arrow_down);
+ product.setProductName("橘子");
+ product.setProductPrice(new BigDecimal("9.9"));
Product product1 = new Product();
- product1.setImageUrlId(R.drawable.qingzao);
- product1.setProductName("青枣");
- product1.setProductPrice("¥6.9/斤");
+ product1.setImageUrlId(R.drawable.orange);
+ product1.setProductName("橙子");
+ product1.setProductPrice(new BigDecimal("29.9"));
Product product2 = new Product();
- product2.setImageUrlId(R.drawable.xigua);
- product2.setProductName("西瓜");
- product2.setProductPrice("¥3.5/斤");
- Product product3 = new Product();
- product3.setImageUrlId(R.drawable.caomei);
- product3.setProductName("草莓");
- product3.setProductPrice("¥19.9/斤");
+ product2.setImageUrlId(R.drawable.arrow_left);
+ product2.setProductName("柚子");
+ product2.setProductPrice(new BigDecimal("19.9"));
productList.add(product);
productList.add(product1);
productList.add(product2);
- productList.add(product3);
}
/**
diff --git a/main/java/com/orangesale/cn/activity/IndexActivity.java b/main/java/com/orangesale/cn/activity/IndexActivity.java
new file mode 100644
index 0000000..0d14008
--- /dev/null
+++ b/main/java/com/orangesale/cn/activity/IndexActivity.java
@@ -0,0 +1,120 @@
+package com.orangesale.cn.activity;
+
+import android.app.Activity;
+import android.app.FragmentTransaction;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.LinearLayout;
+
+import androidx.annotation.Nullable;
+
+import com.orangesale.cn.R;
+import com.orangesale.cn.fragment.IndexFragment;
+import com.orangesale.cn.fragment.PearsonFragment;
+import com.orangesale.cn.fragment.ProductFragment;
+import com.orangesale.cn.fragment.ShoppingCartFragment;
+
+public class IndexActivity extends Activity implements View.OnClickListener {
+ private IndexFragment indexFragment;
+ private ProductFragment productFragment;
+ private ShoppingCartFragment shoppingCartFragment;
+ private PearsonFragment pearsonFragment;
+ private LinearLayout indexLine, productLine, shoppingCartLine, pearsonLine;
+
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ init();
+ initIndexFragment();
+ }
+
+ /**
+ * 组件初始化
+ */
+ private void init() {
+ indexLine = findViewById(R.id.content_index);
+ indexLine.setOnClickListener(this);
+ productLine = findViewById(R.id.content_product);
+ productLine.setOnClickListener(this);
+ shoppingCartLine = findViewById(R.id.content_cart);
+ shoppingCartLine.setOnClickListener(this);
+ pearsonLine = findViewById(R.id.content_pearson);
+ pearsonLine.setOnClickListener(this);
+ }
+
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.content_index:
+ initIndexFragment();
+ break;
+ case R.id.content_product:
+ initproductFragment();
+ break;
+ case R.id.content_cart:
+ initshoppingCartFragment();
+ break;
+ case R.id.content_pearson:
+ initpearsonFragment();
+ break;
+ }
+ }
+
+ /**
+ * 初始化首页Fragment
+ */
+ private void initIndexFragment() {
+ //开启事务,fragment的控制是由事务来实现的
+ FragmentTransaction transaction = getFragmentManager().beginTransaction();
+ if (indexFragment == null) {
+ indexFragment = new IndexFragment();
+ }
+ transaction.replace(R.id.main_content, indexFragment);
+ transaction.commit();
+ }
+
+ /**
+ * 初始化产品Fragment
+ */
+ private void initproductFragment() {
+ //开启事务,fragment的控制是由事务来实现的
+ FragmentTransaction transaction = getFragmentManager().beginTransaction();
+ if (productFragment == null) {
+ productFragment = new ProductFragment();
+ }
+ transaction.replace(R.id.main_content, productFragment);
+ transaction.commit();
+ }
+
+ /**
+ * 初始化购物车Fragment
+ */
+ private void initshoppingCartFragment() {
+ //开启事务,fragment的控制是由事务来实现的
+ FragmentTransaction transaction = getFragmentManager().beginTransaction();
+ if (shoppingCartFragment == null) {
+ shoppingCartFragment = new ShoppingCartFragment();
+ }
+ transaction.replace(R.id.main_content, shoppingCartFragment);
+ transaction.commit();
+ }
+
+ /**
+ * 初始化个人Fragment
+ */
+ private void initpearsonFragment() {
+ //开启事务,fragment的控制是由事务来实现的
+ FragmentTransaction transaction = getFragmentManager().beginTransaction();
+ if (pearsonFragment == null) {
+ Intent intent = IndexActivity.this.getIntent();
+ Bundle bundle = intent.getExtras();
+ pearsonFragment = new PearsonFragment();
+ pearsonFragment.setArguments(bundle);
+ }
+ transaction.replace(R.id.main_content, pearsonFragment);
+ transaction.commit();
+ }
+
+}
diff --git a/main/java/com/orangesale/cn/activity/RegisterActivity.java b/main/java/com/orangesale/cn/activity/RegisterActivity.java
index cb9e2cd..3edcd0c 100644
--- a/main/java/com/orangesale/cn/activity/RegisterActivity.java
+++ b/main/java/com/orangesale/cn/activity/RegisterActivity.java
@@ -128,7 +128,7 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
OrangeDatabase orangeDatabase = new OrangeDatabase(RegisterActivity.this);
SQLiteDatabase sqLiteDatabase = orangeDatabase.getWritableDatabase();
insertData(sqLiteDatabase, bundle);
- Intent intent = new Intent(RegisterActivity.this, UserActivity.class);
+ Intent intent = new Intent(RegisterActivity.this, IndexActivity.class);
intent.putExtras(bundle);
startActivity(intent);
} else {
@@ -162,8 +162,7 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
contentValues.put("password", bundle.getString("password"));
contentValues.put("sex", bundle.getString("sex"));
contentValues.put("city", bundle.getString("city"));
- sqLiteDatabase.insert("user", null, contentValues);
+ sqLiteDatabase.insert("orange_user", null, contentValues);
sqLiteDatabase.close();
}
}
-
diff --git a/main/java/com/orangesale/cn/adapter/ProductAdapter.java b/main/java/com/orangesale/cn/adapter/ProductAdapter.java
new file mode 100644
index 0000000..b3f61ce
--- /dev/null
+++ b/main/java/com/orangesale/cn/adapter/ProductAdapter.java
@@ -0,0 +1,69 @@
+package com.orangesale.cn.adapter;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.orangesale.cn.R;
+import com.orangesale.cn.entity.Product;
+
+import java.util.List;
+
+public class ProductAdapter extends BaseAdapter {
+ private List productList;
+ private LayoutInflater layoutInflater;
+
+ public ProductAdapter(Context context, List productList) {
+ this.productList = productList;
+ this.layoutInflater = LayoutInflater.from(context);
+ }
+
+ @Override
+ public int getCount() {
+ return productList.size();
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return productList.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) {
+ Log.i("aa", "getView: "+"aa");
+ convertView = layoutInflater.inflate(R.layout.categoty_detail_content, null);
+ viewHolder = new ViewHolder();
+ viewHolder.productImage = convertView.findViewById(R.id.category_product_image);
+ viewHolder.productName = convertView.findViewById(R.id.category_product_name);
+ viewHolder.productPrice = convertView.findViewById(R.id.category_product_price);
+ convertView.setTag(viewHolder);
+ } else {
+ viewHolder = (ViewHolder) convertView.getTag();
+ }
+ Product product = productList.get(position);
+ Log.i("product", "getView: "+product.toString());
+ if (product != null) {
+ viewHolder.productImage.setBackgroundResource(product.getImageUrlId());
+ viewHolder.productName.setText(product.getProductName());
+ viewHolder.productPrice.setText(String.valueOf(product.getProductPrice()));
+ }
+ return convertView;
+ }
+
+ class ViewHolder {
+ ImageView productImage;
+ TextView productName, productPrice;
+ }
+}
diff --git a/main/java/com/orangesale/cn/dataoperation/OrangeDatabase.java b/main/java/com/orangesale/cn/dataoperation/OrangeDatabase.java
index 97f6b51..75992f3 100644
--- a/main/java/com/orangesale/cn/dataoperation/OrangeDatabase.java
+++ b/main/java/com/orangesale/cn/dataoperation/OrangeDatabase.java
@@ -11,13 +11,13 @@ import androidx.annotation.Nullable;
public class OrangeDatabase extends SQLiteOpenHelper {
public OrangeDatabase(@Nullable Context context) {
- super(context, "0317shiyan.db", null, 1);
+ super(context, "orange", null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
//创建用户表
- String sql = "create table user(id integer primary key autoincrement, username varchar(50), password varchar(50),sex varchar(10),city carchar(50))";
+ String sql = "create table orange_user(id integer primary key autoincrement, username varchar(50), password varchar(50),sex varchar(10),city carchar(50))";
db.execSQL(sql);
}
@@ -41,7 +41,7 @@ public class OrangeDatabase extends SQLiteOpenHelper {
contentValues.put("password", password);
contentValues.put("sex", sex);
contentValues.put("city", city);
- sqLiteDatabase.insert("user", null, contentValues);
+ sqLiteDatabase.insert("orange_user", null, contentValues);
sqLiteDatabase.close();
}
@@ -54,7 +54,7 @@ public class OrangeDatabase extends SQLiteOpenHelper {
*/
public Bundle queryUserInfo(SQLiteDatabase sqLiteDatabase, Bundle bundle) {
String username = bundle.getString("username");
- Cursor cursor = sqLiteDatabase.rawQuery("select * from user where username=?", new String[]{username});
+ Cursor cursor = sqLiteDatabase.rawQuery("select * from orange_user where username=?", new String[]{username});
if (cursor != null) {
while (cursor.moveToNext()) {
bundle.putString("sex", cursor.getString(3));
diff --git a/main/java/com/orangesale/cn/entity/Product.java b/main/java/com/orangesale/cn/entity/Product.java
index 73bc129..2cab742 100644
--- a/main/java/com/orangesale/cn/entity/Product.java
+++ b/main/java/com/orangesale/cn/entity/Product.java
@@ -1,5 +1,7 @@
package com.orangesale.cn.entity;
+import java.math.BigDecimal;
+
public class Product {
public String getProductName() {
@@ -10,11 +12,11 @@ public class Product {
this.productName = productName;
}
- public String getProductPrice() {
+ public BigDecimal getProductPrice() {
return productPrice;
}
- public void setProductPrice(String productPrice) {
+ public void setProductPrice(BigDecimal productPrice) {
this.productPrice = productPrice;
}
@@ -28,5 +30,14 @@ public class Product {
private Integer imageUrlId;
private String productName;
- private String productPrice;
+ private BigDecimal productPrice;
+
+ @Override
+ public String toString() {
+ return "Product{" +
+ "imageUrlId=" + imageUrlId +
+ ", productName='" + productName + '\'' +
+ ", productPrice=" + productPrice +
+ '}';
+ }
}
diff --git a/main/java/com/orangesale/cn/fragment/IndexFragment.java b/main/java/com/orangesale/cn/fragment/IndexFragment.java
new file mode 100644
index 0000000..4f09b1e
--- /dev/null
+++ b/main/java/com/orangesale/cn/fragment/IndexFragment.java
@@ -0,0 +1,109 @@
+package com.orangesale.cn.fragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.GridView;
+import android.widget.LinearLayout;
+import android.widget.SearchView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.orangesale.cn.R;
+import com.orangesale.cn.adapter.ProductAdapter;
+import com.orangesale.cn.entity.Product;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+public class IndexFragment extends Fragment implements View.OnClickListener {
+ private SearchView searchView;
+ private LinearLayout ningmengLine, youziLine, juziLine, xiguaLine, liLine, appleLine, putaoLine, mangguoLine;
+ private GridView gridView;
+ private List productList;
+ private ProductAdapter productAdapter;
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_index, container, false);
+ init(view);
+ return view;
+ }
+
+ /**
+ * 初始化组件
+ */
+ private void init(View view) {
+ searchView = view.findViewById(R.id.searchView);
+ searchView.setOnClickListener(this);
+ juziLine = view.findViewById(R.id.juzi);
+ juziLine.setOnClickListener(this);
+ youziLine = view.findViewById(R.id.youzi);
+ youziLine.setOnClickListener(this);
+ ningmengLine = view.findViewById(R.id.ningmeng);
+ ningmengLine.setOnClickListener(this);
+ xiguaLine = view.findViewById(R.id.xigua);
+ xiguaLine.setOnClickListener(this);
+ liLine = view.findViewById(R.id.li);
+ liLine.setOnClickListener(this);
+ putaoLine = view.findViewById(R.id.putao);
+ putaoLine.setOnClickListener(this);
+ mangguoLine = view.findViewById(R.id.mangguo);
+ mangguoLine.setOnClickListener(this);
+ appleLine = view.findViewById(R.id.apple);
+ appleLine.setOnClickListener(this);
+ gridView = view.findViewById(R.id.index_famous_gridview);
+ initData();
+ productAdapter = new ProductAdapter(getActivity(), productList);
+ gridView.setAdapter(productAdapter);
+ }
+
+
+ @Override
+ public void onClick(View v) {
+
+ }
+
+ /**
+ * 初始化商品数据
+ */
+ private void initData() {
+ productList = new ArrayList<>();
+ Product product = new Product();
+ product.setImageUrlId(R.drawable.juzip);
+ product.setProductName("橘子");
+ product.setProductPrice(new BigDecimal("9.9"));
+ Product product1 = new Product();
+ product1.setImageUrlId(R.drawable.orange);
+ product1.setProductName("橙子");
+ product1.setProductPrice(new BigDecimal("29.9"));
+ Product product2 = new Product();
+ product2.setImageUrlId(R.drawable.youzip);
+ product2.setProductName("柚子");
+ product2.setProductPrice(new BigDecimal("19.9"));
+ Product product3 = new Product();
+ product3.setImageUrlId(R.drawable.xiguap);
+ product3.setProductName("西瓜");
+ product3.setProductPrice(new BigDecimal("19.9"));
+ Product product4 = new Product();
+ product4.setImageUrlId(R.drawable.applep);
+ product4.setProductName("苹果");
+ product4.setProductPrice(new BigDecimal("49.9"));
+ Product product5 = new Product();
+ product5.setImageUrlId(R.drawable.lemonp);
+ product5.setProductName("柠檬");
+ product5.setProductPrice(new BigDecimal("9.9"));
+ productList.add(product);
+ productList.add(product1);
+ productList.add(product2);
+ productList.add(product3);
+ productList.add(product4);
+ productList.add(product5);
+
+ }
+}
diff --git a/main/java/com/orangesale/cn/fragment/PearsonFragment.java b/main/java/com/orangesale/cn/fragment/PearsonFragment.java
new file mode 100644
index 0000000..cc6f5ca
--- /dev/null
+++ b/main/java/com/orangesale/cn/fragment/PearsonFragment.java
@@ -0,0 +1,64 @@
+package com.orangesale.cn.fragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.orangesale.cn.R;
+
+public class PearsonFragment extends Fragment implements View.OnClickListener {
+ private ImageView userIconImage;
+ private TextView usernameText, userSexText, userCityText;
+ private LinearLayout usernameLine, userSexline, userCityLine, userPayLine, userSettingLine, userGeneralLine;
+
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_user, container, false);
+ init(view);
+ return view;
+ }
+
+ /**
+ * 组件初始化
+ */
+ private void init(View view) {
+ userIconImage = view.findViewById(R.id.user_icon);
+ usernameText = view.findViewById(R.id.user_username);
+ userSexText = view.findViewById(R.id.user_sex);
+ userCityText = view.findViewById(R.id.user_city);
+ usernameLine = view.findViewById(R.id.user_username_line);
+ userSexline = view.findViewById(R.id.user_sex_line);
+ userCityLine = view.findViewById(R.id.user_city_line);
+ userPayLine = view.findViewById(R.id.user_pay);
+ userSettingLine = view.findViewById(R.id.user_setting);
+ userGeneralLine = view.findViewById(R.id.user_general);
+ setData();
+ }
+
+ /**
+ * 组件赋值
+ */
+ private void setData() {
+ Bundle bundle = getArguments();
+ usernameText.setText(String.format("用户名:%s", bundle.getString("username")));
+ userSexText.setText(String.format("性别:%s", bundle.getString("sex")));
+ userCityText.setText(String.format("城市:%s", bundle.getString("city")));
+ }
+
+ @Override
+ public void onClick(View v) {
+
+ }
+
+
+}
diff --git a/main/java/com/orangesale/cn/fragment/ProductFragment.java b/main/java/com/orangesale/cn/fragment/ProductFragment.java
new file mode 100644
index 0000000..fdcbd92
--- /dev/null
+++ b/main/java/com/orangesale/cn/fragment/ProductFragment.java
@@ -0,0 +1,21 @@
+package com.orangesale.cn.fragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.orangesale.cn.R;
+
+public class ProductFragment extends Fragment {
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_product, container, false);
+ return view;
+ }
+}
diff --git a/main/java/com/orangesale/cn/fragment/ShoppingCartFragment.java b/main/java/com/orangesale/cn/fragment/ShoppingCartFragment.java
new file mode 100644
index 0000000..b288f98
--- /dev/null
+++ b/main/java/com/orangesale/cn/fragment/ShoppingCartFragment.java
@@ -0,0 +1,21 @@
+package com.orangesale.cn.fragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.orangesale.cn.R;
+
+public class ShoppingCartFragment extends Fragment {
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_shopping, container, false);
+ return view;
+ }
+}
diff --git a/main/res/drawable/apple.png b/main/res/drawable/apple.png
new file mode 100644
index 0000000..0810381
Binary files /dev/null and b/main/res/drawable/apple.png differ
diff --git a/main/res/drawable/applep.png b/main/res/drawable/applep.png
new file mode 100644
index 0000000..e26da47
Binary files /dev/null and b/main/res/drawable/applep.png differ
diff --git a/main/res/drawable/caomei.jpeg b/main/res/drawable/caomei.jpeg
deleted file mode 100644
index 9e2d29d..0000000
Binary files a/main/res/drawable/caomei.jpeg and /dev/null differ
diff --git a/main/res/drawable/car.jpg b/main/res/drawable/car.jpg
new file mode 100644
index 0000000..739a5d6
Binary files /dev/null and b/main/res/drawable/car.jpg differ
diff --git a/main/res/drawable/down.png b/main/res/drawable/down.png
deleted file mode 100644
index 6d95bb5..0000000
Binary files a/main/res/drawable/down.png and /dev/null differ
diff --git a/main/res/drawable/fire.webp b/main/res/drawable/fire.webp
new file mode 100644
index 0000000..d8ab303
Binary files /dev/null and b/main/res/drawable/fire.webp differ
diff --git a/main/res/drawable/home.webp b/main/res/drawable/home.webp
new file mode 100644
index 0000000..369913f
Binary files /dev/null and b/main/res/drawable/home.webp differ
diff --git a/main/res/drawable/index.png b/main/res/drawable/index.png
new file mode 100644
index 0000000..cc1ec04
Binary files /dev/null and b/main/res/drawable/index.png differ
diff --git a/main/res/drawable/index_menu.xml b/main/res/drawable/index_menu.xml
new file mode 100644
index 0000000..14636dd
--- /dev/null
+++ b/main/res/drawable/index_menu.xml
@@ -0,0 +1,16 @@
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/drawable/ju.png b/main/res/drawable/ju.png
new file mode 100644
index 0000000..b866e40
Binary files /dev/null and b/main/res/drawable/ju.png differ
diff --git a/main/res/drawable/juzip.png b/main/res/drawable/juzip.png
new file mode 100644
index 0000000..4f10b72
Binary files /dev/null and b/main/res/drawable/juzip.png differ
diff --git a/main/res/drawable/lemon.png b/main/res/drawable/lemon.png
new file mode 100644
index 0000000..39f12cc
Binary files /dev/null and b/main/res/drawable/lemon.png differ
diff --git a/main/res/drawable/lemonp.png b/main/res/drawable/lemonp.png
new file mode 100644
index 0000000..ca5eca8
Binary files /dev/null and b/main/res/drawable/lemonp.png differ
diff --git a/main/res/drawable/li.png b/main/res/drawable/li.png
new file mode 100644
index 0000000..0834592
Binary files /dev/null and b/main/res/drawable/li.png differ
diff --git a/main/res/drawable/mang.webp b/main/res/drawable/mang.webp
new file mode 100644
index 0000000..670a557
Binary files /dev/null and b/main/res/drawable/mang.webp differ
diff --git a/main/res/drawable/mangguo.png b/main/res/drawable/mangguo.png
new file mode 100644
index 0000000..2e9825c
Binary files /dev/null and b/main/res/drawable/mangguo.png differ
diff --git a/main/res/drawable/ning.webp b/main/res/drawable/ning.webp
new file mode 100644
index 0000000..aea1540
Binary files /dev/null and b/main/res/drawable/ning.webp differ
diff --git a/main/res/drawable/pearson.png b/main/res/drawable/pearson.png
new file mode 100644
index 0000000..90cf0eb
Binary files /dev/null and b/main/res/drawable/pearson.png differ
diff --git a/main/res/drawable/ping.webp b/main/res/drawable/ping.webp
new file mode 100644
index 0000000..28fcdf0
Binary files /dev/null and b/main/res/drawable/ping.webp differ
diff --git a/main/res/drawable/product.png b/main/res/drawable/product.png
new file mode 100644
index 0000000..8f5cb21
Binary files /dev/null and b/main/res/drawable/product.png differ
diff --git a/main/res/drawable/pu.webp b/main/res/drawable/pu.webp
new file mode 100644
index 0000000..8c11581
Binary files /dev/null and b/main/res/drawable/pu.webp differ
diff --git a/main/res/drawable/putao.jpg b/main/res/drawable/putao.jpg
deleted file mode 100644
index 4ec6780..0000000
Binary files a/main/res/drawable/putao.jpg and /dev/null differ
diff --git a/main/res/drawable/qingzao.jpeg b/main/res/drawable/qingzao.jpeg
deleted file mode 100644
index 70ee95b..0000000
Binary files a/main/res/drawable/qingzao.jpeg and /dev/null differ
diff --git a/main/res/drawable/shoppingcar.webp b/main/res/drawable/shoppingcar.webp
deleted file mode 100644
index 1d2015f..0000000
Binary files a/main/res/drawable/shoppingcar.webp and /dev/null differ
diff --git a/main/res/drawable/shoppingcart.png b/main/res/drawable/shoppingcart.png
new file mode 100644
index 0000000..76c06de
Binary files /dev/null and b/main/res/drawable/shoppingcart.png differ
diff --git a/main/res/drawable/shuiguo.png b/main/res/drawable/shuiguo.png
new file mode 100644
index 0000000..d316137
Binary files /dev/null and b/main/res/drawable/shuiguo.png differ
diff --git a/main/res/drawable/surepassword.png b/main/res/drawable/surepassword.png
deleted file mode 100644
index 0e7cee9..0000000
Binary files a/main/res/drawable/surepassword.png and /dev/null differ
diff --git a/main/res/drawable/tab_menu_text.xml b/main/res/drawable/tab_menu_text.xml
new file mode 100644
index 0000000..fb06945
--- /dev/null
+++ b/main/res/drawable/tab_menu_text.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/drawable/thing.webp b/main/res/drawable/thing.webp
new file mode 100644
index 0000000..bb0bf69
Binary files /dev/null and b/main/res/drawable/thing.webp differ
diff --git a/main/res/drawable/xi.webp b/main/res/drawable/xi.webp
new file mode 100644
index 0000000..11a613f
Binary files /dev/null and b/main/res/drawable/xi.webp differ
diff --git a/main/res/drawable/xiang.webp b/main/res/drawable/xiang.webp
new file mode 100644
index 0000000..35a636b
Binary files /dev/null and b/main/res/drawable/xiang.webp differ
diff --git a/main/res/drawable/xigua.jpeg b/main/res/drawable/xigua.jpeg
deleted file mode 100644
index 67aef58..0000000
Binary files a/main/res/drawable/xigua.jpeg and /dev/null differ
diff --git a/main/res/drawable/xigua.png b/main/res/drawable/xigua.png
new file mode 100644
index 0000000..20275c1
Binary files /dev/null and b/main/res/drawable/xigua.png differ
diff --git a/main/res/drawable/xiguap.png b/main/res/drawable/xiguap.png
new file mode 100644
index 0000000..b760712
Binary files /dev/null and b/main/res/drawable/xiguap.png differ
diff --git a/main/res/drawable/you.webp b/main/res/drawable/you.webp
new file mode 100644
index 0000000..055a535
Binary files /dev/null and b/main/res/drawable/you.webp differ
diff --git a/main/res/drawable/youzip.png b/main/res/drawable/youzip.png
new file mode 100644
index 0000000..5a7d966
Binary files /dev/null and b/main/res/drawable/youzip.png differ
diff --git a/main/res/layout/activity_main.xml b/main/res/layout/activity_main.xml
index 4fc2444..dfe67c8 100644
--- a/main/res/layout/activity_main.xml
+++ b/main/res/layout/activity_main.xml
@@ -1,18 +1,29 @@
-
+ android:orientation="vertical"
+ tools:context=".activity.IndexActivity">
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/categoty_detail_content.xml b/main/res/layout/categoty_detail_content.xml
index 70223bc..2b3a24f 100644
--- a/main/res/layout/categoty_detail_content.xml
+++ b/main/res/layout/categoty_detail_content.xml
@@ -2,49 +2,31 @@
-
+ android:background="#fff"
+ android:orientation="vertical">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_width="wrap_content"
+ android:layout_marginTop="5dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center" />
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/content_index.xml b/main/res/layout/content_index.xml
new file mode 100644
index 0000000..ba600d7
--- /dev/null
+++ b/main/res/layout/content_index.xml
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/content_nav.xml b/main/res/layout/content_nav.xml
new file mode 100644
index 0000000..0265169
--- /dev/null
+++ b/main/res/layout/content_nav.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/right_list.xml b/main/res/layout/content_product.xml
similarity index 55%
rename from main/res/layout/right_list.xml
rename to main/res/layout/content_product.xml
index 6ff6a7a..c946607 100644
--- a/main/res/layout/right_list.xml
+++ b/main/res/layout/content_product.xml
@@ -1,14 +1,11 @@
-
-
-
-
+ android:text="product" />
+
\ No newline at end of file
diff --git a/main/res/layout/content_shopping.xml b/main/res/layout/content_shopping.xml
new file mode 100644
index 0000000..e152fbb
--- /dev/null
+++ b/main/res/layout/content_shopping.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/content_user.xml b/main/res/layout/content_user.xml
index 67c4625..186f5fd 100644
--- a/main/res/layout/content_user.xml
+++ b/main/res/layout/content_user.xml
@@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFF"
- android:layout_marginTop="40dp"
+ android:layout_marginTop="20dp"
android:orientation="horizontal">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main/res/layout/user_register.xml b/main/res/layout/user_register.xml
index f7bd8b0..b7bbbc4 100644
--- a/main/res/layout/user_register.xml
+++ b/main/res/layout/user_register.xml
@@ -5,6 +5,7 @@
android:orientation="vertical"
android:background="#E8E8E8">
+
@@ -42,7 +43,7 @@
+ android:src="@drawable/sure_apssword" />
+ android:src="@drawable/sex" />