master
3189462719@qq.com 2 years ago
parent cac955396c
commit f32922610a

@ -2,5 +2,6 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="" vcs="Git" />
</component> </component>
</project> </project>

@ -4,7 +4,7 @@ android {
compileSdkVersion 30 compileSdkVersion 30
buildToolsVersion "30.0.2" buildToolsVersion "30.0.2"
defaultConfig { defaultConfig {
applicationId "com.example.orangesale_04" applicationId "com.example.orangesale_05"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 30 targetSdkVersion 30
versionCode 1 versionCode 1
@ -21,6 +21,7 @@ android {
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
} }
} }
dependencies { dependencies {

@ -1,4 +1,4 @@
package com.example.orangesale_04; package com.example.orangesale_05;
import android.content.Context; import android.content.Context;
@ -22,6 +22,6 @@ public class ExampleInstrumentedTest {
// Context of the app under test. // Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.orangesale_04", appContext.getPackageName()); assertEquals("com.example.orangesale_05", appContext.getPackageName());
} }
} }

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.orangesale_04"> package="com.example.orangesale_05">
<application <application
android:allowBackup="true" android:allowBackup="true"

@ -1,135 +0,0 @@
package com.example.orangesale_04.activity;
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import androidx.annotation.Nullable;
import com.example.orangesale_04.R;
import com.example.orangesale_04.adapter.Adapter;
import com.example.orangesale_04.entity.Product;
import com.example.orangesale_04.fragment.SetDetailFragment;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class CategoryActivity extends Activity {
public OnChangeListener onchangedListener;
private List<Product> productList;
private List<String> productCategory = new ArrayList<>();
private ListView titleList;
private Adapter adapter;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content_category);
initData();
init();
SetDetailFragment fragment = new SetDetailFragment();
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.replace(R.id.category_detail, fragment);
transaction.commit();
titleList.setOnItemClickListener((parent, view, position, id) -> {
adapter.setSelectedPosition(position);
adapter.notifyDataSetInvalidated();
if (onchangedListener != null) {
onchangedListener.changeText(productList.get(position));
}
});
/* titleList.setOnItemClickListener((parent, view, position, id) -> {
adapter.setSelectedPosition(position);
adapter.notifyDataSetInvalidated();
if (onchangedListener != null) {
onchangedListener.changeText(productList.get(position));
}
});
*/
}
public void setOnChangeListener(OnChangeListener onChangeListener) {
this.onchangedListener = onChangeListener;
}
public interface OnChangeListener {
void changeText(Product product);
}
/**
*
*/
private void initData() {
productList = new ArrayList<>();
productCategory.add("水果");
productCategory.add("办公材料");
productCategory.add("工艺品");
productCategory.add("零食");
productCategory.add("服装");
productCategory.add("生活用品");
productCategory.add("文具");
productCategory.add("生鲜");
productCategory.add("医药");
Product product = new Product();
product.setImageUrlId(R.drawable.juzi1);
product.setProductName("橘子");
product.setProductPrice(new BigDecimal("9.9"));
Product product1 = new Product();
product1.setImageUrlId(R.drawable.chengzi);
product1.setProductName("橙子");
product1.setProductPrice(new BigDecimal("29.9"));
Product product2 = new Product();
product2.setImageUrlId(R.drawable.youzi);
product2.setProductName("柚子");
product2.setProductPrice(new BigDecimal("19.9"));
Product product3 = new Product();
product3.setImageUrlId(R.drawable.xigua);
product3.setProductName("西瓜");
product3.setProductPrice(new BigDecimal("39.9"));
Product product4 = new Product();
product4.setImageUrlId(R.drawable.fuzhuang);
product4.setProductName("衬衫");
product4.setProductPrice(new BigDecimal("30.9"));
Product product5 = new Product();
product5.setImageUrlId(R.drawable.shenghuo);
product5.setProductName("常用品");
product5.setProductPrice(new BigDecimal("50"));
Product product6 = new Product();
product6.setImageUrlId(R.drawable.wenju);
product6.setProductName("文具礼盒");
product6.setProductPrice(new BigDecimal("49.9"));
Product product7 = new Product();
product7.setImageUrlId(R.drawable.shengxian);
product7.setProductName("果蔬拼盘");
product7.setProductPrice(new BigDecimal("25.7"));
Product product8 = new Product();
product8.setImageUrlId(R.drawable.shengxian);
product8.setProductName("常用医药");
product8.setProductPrice(new BigDecimal("19.9"));
productList.add(product);
productList.add(product1);
productList.add(product2);
productList.add(product3);
productList.add(product4);
productList.add(product5);
productList.add(product6);
productList.add(product7);
productList.add(product8);
}
/**
*
*/
private void init() {
titleList = findViewById(R.id.category_title_list);
adapter = new Adapter(productCategory, CategoryActivity.this);
titleList.setAdapter(adapter);
}
}

@ -1,4 +1,4 @@
package com.example.orangesale_04; package com.example.orangesale_05;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
@ -11,9 +11,9 @@ import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.example.orangesale_04.activity.IndexActivity; import com.example.orangesale_05.activity.IndexActivity;
import com.example.orangesale_04.activity.RegisterActivity; import com.example.orangesale_05.activity.RegisterActivity;
import com.example.orangesale_04.dataoperation.OrangeDatabase; import com.example.orangesale_05.dataoperation.OrangeDatabase;
public class MainActivity extends AppCompatActivity implements View.OnClickListener { public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private Button registerButton, loginButton; private Button registerButton, loginButton;

@ -0,0 +1,90 @@
package com.example.orangesale_05.activity;
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.widget.ListView;
import androidx.annotation.Nullable;
import com.example.orangesale_05.R;
import com.example.orangesale_05.adapter.Adapter;
import com.example.orangesale_05.entity.Product;
import com.example.orangesale_05.fragment.SetDetailFragment;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class CategoryActivity extends Activity {
public OnChangeListener onchangedListener;
private List<Product> productList;
private List<String> productCategory = new ArrayList<>();
private ListView titleList;
private Adapter adapter;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content_category);
initData();
init();
SetDetailFragment fragment = new SetDetailFragment();
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.replace(R.id.category_detail, fragment);
transaction.commit();
titleList.setOnItemClickListener((parent, view, position, id) -> {
adapter.setSelectedPosition(position);
adapter.notifyDataSetInvalidated();
if (onchangedListener != null) {
onchangedListener.changeText(productList.get(position));
}
});
}
public void setOnChangeListener(OnChangeListener onChangeListener) {
this.onchangedListener = onChangeListener;
}
public interface OnChangeListener {
void changeText(Product product);
}
/**
*
*/
private void initData() {
productList = new ArrayList<>();
productCategory.add("橘子");
productCategory.add("橙子");
productCategory.add("柚子");
Product product = new Product();
product.setImageUrlId(R.drawable.arrow_down);
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.arrow_left);
product2.setProductName("柚子");
product2.setProductPrice(new BigDecimal("19.9"));
productList.add(product);
productList.add(product1);
productList.add(product2);
}
/**
*
*/
private void init() {
titleList = findViewById(R.id.category_title_list);
adapter = new Adapter(productCategory, CategoryActivity.this);
titleList.setAdapter(adapter);
}
}

@ -1,4 +1,4 @@
package com.example.orangesale_04.activity; package com.example.orangesale_05.activity;
import android.app.Activity; import android.app.Activity;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
@ -9,11 +9,11 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import com.example.orangesale_04.fragment.IndexFragment; import com.example.orangesale_05.fragment.IndexFragment;
import com.example.orangesale_04.fragment.PearsonFragment; import com.example.orangesale_05.fragment.PearsonFragment;
import com.example.orangesale_04.fragment.ProductFragment; import com.example.orangesale_05.fragment.ProductFragment;
import com.example.orangesale_04.fragment.ShoppingCartFragment; import com.example.orangesale_05.fragment.ShoppingCartFragment;
public class IndexActivity extends Activity implements View.OnClickListener { public class IndexActivity extends Activity implements View.OnClickListener {
private IndexFragment indexFragment; private IndexFragment indexFragment;

@ -1,4 +1,4 @@
package com.example.orangesale_04.activity; package com.example.orangesale_05.activity;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Intent; import android.content.Intent;
@ -16,8 +16,8 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.lljjcoder.citypickerview.widget.CityPicker; import com.lljjcoder.citypickerview.widget.CityPicker;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import com.example.orangesale_04.dataoperation.OrangeDatabase; import com.example.orangesale_05.dataoperation.OrangeDatabase;
public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, RadioGroup.OnCheckedChangeListener { public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, RadioGroup.OnCheckedChangeListener {
private EditText usernameEdit, passwordEdit, surePasswordEdit; private EditText usernameEdit, passwordEdit, surePasswordEdit;

@ -1,4 +1,4 @@
package com.example.orangesale_04.activity; package com.example.orangesale_05.activity;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
@ -10,8 +10,7 @@ import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.MainActivity; import com.example.orangesale_05.R;
import com.example.orangesale_04.R;
public class UserActivity extends Activity implements View.OnClickListener { public class UserActivity extends Activity implements View.OnClickListener {
private ImageView userIconImage; private ImageView userIconImage;

@ -1,4 +1,4 @@
package com.example.orangesale_04.adapter; package com.example.orangesale_05.adapter;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
@ -9,7 +9,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.TextView; import android.widget.TextView;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import java.util.List; import java.util.List;

@ -1,4 +1,4 @@
package com.example.orangesale_04.adapter; package com.example.orangesale_05.adapter;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;
@ -9,8 +9,8 @@ import android.widget.BaseAdapter;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import com.example.orangesale_04.entity.Product; import com.example.orangesale_05.entity.Product;
import java.util.List; import java.util.List;

@ -1,4 +1,4 @@
package com.example.orangesale_04.dataoperation; package com.example.orangesale_05.dataoperation;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;

@ -1,4 +1,4 @@
package com.example.orangesale_04.entity; package com.example.orangesale_05.entity;
public class OrangeUser { public class OrangeUser {
private Integer id; private Integer id;

@ -1,4 +1,4 @@
package com.example.orangesale_04.entity; package com.example.orangesale_05.entity;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -31,6 +31,7 @@ public class Product {
private Integer imageUrlId; private Integer imageUrlId;
private String productName; private String productName;
private BigDecimal productPrice; private BigDecimal productPrice;
@Override @Override
public String toString() { public String toString() {
return "Product{" + return "Product{" +

@ -1,4 +1,4 @@
package com.example.orangesale_04.fragment; package com.example.orangesale_05.fragment;
import android.app.Fragment; import android.app.Fragment;
import android.os.Bundle; import android.os.Bundle;
@ -12,9 +12,9 @@ import android.widget.SearchView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import com.example.orangesale_04.adapter.ProductAdapter; import com.example.orangesale_05.adapter.ProductAdapter;
import com.example.orangesale_04.entity.Product; import com.example.orangesale_05.entity.Product;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
@ -41,22 +41,22 @@ public class IndexFragment extends Fragment implements View.OnClickListener {
private void init(View view) { private void init(View view) {
searchView = view.findViewById(R.id.searchView); searchView = view.findViewById(R.id.searchView);
searchView.setOnClickListener(this); searchView.setOnClickListener(this);
orangeLine = view.findViewById(R.id.chengzi); orangeLine = view.findViewById(R.id.baocui);
orangeLine.setOnClickListener(this); orangeLine.setOnClickListener(this);
youziLine = view.findViewById(R.id.youzi); youziLine = view.findViewById(R.id.sanmingzhi);
youziLine.setOnClickListener(this); youziLine.setOnClickListener(this);
juziLine = view.findViewById(R.id.juzi); juziLine = view.findViewById(R.id.tusi);
juziLine.setOnClickListener(this); juziLine.setOnClickListener(this);
xiguaLine = view.findViewById(R.id.xigua); xiguaLine = view.findViewById(R.id.xiaomantou);
xiguaLine.setOnClickListener(this); xiguaLine.setOnClickListener(this);
liLine = view.findViewById(R.id.li); liLine = view.findViewById(R.id.paofu);
liLine.setOnClickListener(this); liLine.setOnClickListener(this);
lemonLine = view.findViewById(R.id.lemon); lemonLine = view.findViewById(R.id.dangao);
lemonLine.setOnClickListener(this); lemonLine.setOnClickListener(this);
mangguoLine = view.findViewById(R.id.mangguo); mangguoLine = view.findViewById(R.id.shousimianbao);
mangguoLine.setOnClickListener(this);
mangguoLine = view.findViewById(R.id.taosu);
mangguoLine.setOnClickListener(this); mangguoLine.setOnClickListener(this);
appleLine = view.findViewById(R.id.apple);
appleLine.setOnClickListener(this);
gridView = view.findViewById(R.id.index_famous_gridview); gridView = view.findViewById(R.id.index_famous_gridview);
initData(); initData();
productAdapter = new ProductAdapter(getActivity(), productList); productAdapter = new ProductAdapter(getActivity(), productList);
@ -75,35 +75,44 @@ public class IndexFragment extends Fragment implements View.OnClickListener {
private void initData() { private void initData() {
productList = new ArrayList<>(); productList = new ArrayList<>();
Product product = new Product(); Product product = new Product();
product.setImageUrlId(R.drawable.juzi); product.setImageUrlId(R.drawable.caomeidangao);
product.setProductName("橘子"); product.setProductName("草莓蛋糕");
product.setProductPrice(new BigDecimal("9.9")); product.setProductPrice(new BigDecimal("59.9"));
Product product1 = new Product(); Product product1 = new Product();
product1.setImageUrlId(R.drawable.orange); product1.setImageUrlId(R.drawable.qiepianmianbao);
product1.setProductName("橙子"); product1.setProductName("切片面包");
product1.setProductPrice(new BigDecimal("29.9")); product1.setProductPrice(new BigDecimal("9.9"));
Product product2 = new Product(); Product product2 = new Product();
product2.setImageUrlId(R.drawable.youzi); product2.setImageUrlId(R.drawable.rousongxiaobei);
product2.setProductName("柚子"); product2.setProductName("肉松小贝");
product2.setProductPrice(new BigDecimal("19.9")); product2.setProductPrice(new BigDecimal("25.0"));
Product product3 = new Product(); Product product3 = new Product();
product3.setImageUrlId(R.drawable.xigua); product3.setImageUrlId(R.drawable.suannaipaofu);
product3.setProductName("西瓜"); product3.setProductName("酸奶泡芙");
product3.setProductPrice(new BigDecimal("19.9")); product3.setProductPrice(new BigDecimal("10.0"));
Product product4 = new Product(); Product product4 = new Product();
product4.setImageUrlId(R.drawable.apple); product4.setImageUrlId(R.drawable.ttq);
product4.setProductName("苹果"); product4.setProductName("甜甜圈");
product4.setProductPrice(new BigDecimal("49.9")); product4.setProductPrice(new BigDecimal("6.99"));
Product product5 = new Product(); Product product5 = new Product();
product5.setImageUrlId(R.drawable.lemon); product5.setImageUrlId(R.drawable.shousimianbao);
product5.setProductName("柠檬"); product5.setProductName("手撕面包");
product5.setProductPrice(new BigDecimal("9.9")); product5.setProductPrice(new BigDecimal("12.0"));
Product product6 = new Product();
product6.setImageUrlId(R.drawable.fenghuangjuan);
product6.setProductName("凤凰卷");
product6.setProductPrice(new BigDecimal("7.99"));
Product product7 = new Product();
product7.setImageUrlId(R.drawable.quqibing);
product7.setProductName("曲奇饼");
product7.setProductPrice(new BigDecimal("20.0"));
productList.add(product); productList.add(product);
productList.add(product1); productList.add(product1);
productList.add(product2); productList.add(product2);
productList.add(product3); productList.add(product3);
productList.add(product4); productList.add(product4);
productList.add(product5); productList.add(product5);
productList.add(product6);
productList.add(product7);
} }
} }

@ -1,4 +1,4 @@
package com.example.orangesale_04.fragment; package com.example.orangesale_05.fragment;
import android.app.Fragment; import android.app.Fragment;
import android.os.Bundle; import android.os.Bundle;
@ -12,7 +12,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
public class PearsonFragment extends Fragment implements View.OnClickListener { public class PearsonFragment extends Fragment implements View.OnClickListener {
private ImageView userIconImage; private ImageView userIconImage;

@ -1,4 +1,4 @@
package com.example.orangesale_04.fragment; package com.example.orangesale_05.fragment;
import android.app.Fragment; import android.app.Fragment;
import android.os.Bundle; import android.os.Bundle;
@ -9,7 +9,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
public class ProductFragment extends Fragment { public class ProductFragment extends Fragment {
@Nullable @Nullable

@ -1,4 +1,4 @@
package com.example.orangesale_04.fragment; package com.example.orangesale_05.fragment;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Fragment; import android.app.Fragment;
@ -13,9 +13,8 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
import com.example.orangesale_04.activity.CategoryActivity; import com.example.orangesale_05.activity.CategoryActivity;
import com.example.orangesale_04.entity.Product;
import java.util.Objects; import java.util.Objects;
@ -33,22 +32,12 @@ public class SetDetailFragment extends Fragment {
init(); init();
} }
CategoryActivity categoryActivity = (CategoryActivity) getActivity(); CategoryActivity categoryActivity = (CategoryActivity) getActivity();
categoryActivity.setOnChangeListener(new CategoryActivity.OnChangeListener() { Objects.requireNonNull(categoryActivity).setOnChangeListener(product -> {
@Override
public void changeText(Product product) {
imageView.setBackgroundResource(product.getImageUrlId());
nameText.setText(product.getProductName());
priceText.setText(product.getProductPrice().toString());
}
});
/* Objects.requireNonNull(categoryActivity).setOnChangeListener(product -> {
Log.i("sss", "onCreateView: " + product.getProductName()); Log.i("sss", "onCreateView: " + product.getProductName());
imageView.setBackgroundResource(product.getImageUrlId()); imageView.setBackgroundResource(product.getImageUrlId());
nameText.setText(product.getProductName()); nameText.setText(product.getProductName());
priceText.setText(product.getProductPrice().toString()); priceText.setText(product.getProductPrice().toString());
}); });
*/
return view; return view;
} }

@ -1,4 +1,4 @@
package com.example.orangesale_04.fragment; package com.example.orangesale_05.fragment;
import android.app.Fragment; import android.app.Fragment;
import android.os.Bundle; import android.os.Bundle;
@ -9,7 +9,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.example.orangesale_04.R; import com.example.orangesale_05.R;
public class ShoppingCartFragment extends Fragment { public class ShoppingCartFragment extends Fragment {
@Nullable @Nullable

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="#EFB81C" />
<corners android:radius="5dp" />
</shape>
</item>
</selector>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#F0A732" android:state_selected="true" />
<item android:color="#CFCFCF" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

@ -7,13 +7,13 @@
android:orientation="vertical" android:orientation="vertical"
tools:context=".activity.IndexActivity"> tools:context=".activity.IndexActivity">
<!-- <LinearLayout <!-- <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="5"> android:layout_weight="5">
<include layout="@layout/content_user"/> <include layout="@layout/content_user"/>
</LinearLayout>--> </LinearLayout>-->
<FrameLayout <FrameLayout
android:id="@+id/main_content" android:id="@+id/main_content"
android:layout_width="match_parent" android:layout_width="match_parent"

@ -6,9 +6,9 @@
<TextView <TextView
android:id="@+id/categor_titles" android:id="@+id/categor_titles"
android:layout_width="109dp" android:layout_width="match_parent"
android:layout_height="85dp"
android:gravity="center" android:gravity="center"
android:text="标题" android:layout_height="wrap_content"
android:textSize="18sp" /> android:textSize="18sp"
android:text="标题" />
</LinearLayout> </LinearLayout>

@ -2,95 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#fff"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:id="@+id/category_product_image"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center" />
<TextView
android:id="@+id/category_product_name"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:textColor="#050505"
android:textSize="16sp" />
<TextView
android:id="@+id/category_product_price"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:gravity="center"
android:textColor="#050505"
android:textSize="16sp" />
<ImageView <ImageView
android:id="@+id/category_product_image" android:id="@+id/category_product_image"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:src="@drawable/taozi" />
<TextView
android:id="@+id/category_product_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_marginTop="5dp"
android:layout_gravity="center" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_gravity="center" />
android:text="橙子"
android:textColor="#050505"
android:textSize="16sp" />
<TextView
android:id="@+id/category_product_price"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:gravity="center"
android:textColor="#050505"
android:text="19.9"
android:textSize="16sp" />
<ImageView
android:id="@+id/category_product_image"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:src="@drawable/shuiguo" />
<TextView
android:id="@+id/category_product_name"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:text="拼盘1"
android:textColor="#050505"
android:textSize="16sp" />
<TextView
android:id="@+id/category_product_price"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:gravity="center"
android:textColor="#050505"
android:text="99.0"
android:textSize="16sp" />
<ImageView
android:id="@+id/category_product_image"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:src="@drawable/pinpan" />
<TextView <TextView
android:id="@+id/category_product_name" android:id="@+id/category_product_name"
@ -98,7 +17,6 @@
android:layout_height="30dp" android:layout_height="30dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:text="拼盘2"
android:textColor="#050505" android:textColor="#050505"
android:textSize="16sp" /> android:textSize="16sp" />
@ -110,6 +28,5 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:gravity="center" android:gravity="center"
android:textColor="#050505" android:textColor="#050505"
android:text="99.0"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>

@ -25,7 +25,7 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="百货超市" android:text="商品种类"
android:textColor="#FFF" android:textColor="#FFF"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>

@ -30,7 +30,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/chengzi" android:id="@+id/baocui"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -38,21 +38,21 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/chengzi" /> android:src="@drawable/baocui" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="橙子" android:text="薄脆"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/youzi" android:id="@+id/sanmingzhi"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -60,21 +60,21 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/youzi" /> android:src="@drawable/sanmingzhi" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="柚子" android:text="三明治"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/juzi" android:id="@+id/tusi"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -82,21 +82,21 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/juzi" /> android:src="@drawable/tusi" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="橘子" android:text="吐司"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/xigua" android:id="@+id/xiaomantou"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -104,15 +104,15 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="50dp" android:layout_height="50dp"
android:src="@drawable/xigua" /> android:src="@drawable/xiaomantou" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="西瓜" android:text="小馒头"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
@ -126,7 +126,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/li" android:id="@+id/paofu"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -134,21 +134,21 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/li" /> android:src="@drawable/paofu" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="香梨" android:text="泡芙"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/apple" android:id="@+id/dangao"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -156,21 +156,21 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/apple" /> android:src="@drawable/dangao" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="苹果" android:text="蛋糕"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/lemon" android:id="@+id/shousimianbao"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -178,21 +178,20 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/lemon" /> android:src="@drawable/shousibao" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="柠檬" android:text="手撕面包"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/mangguo" android:id="@+id/taosu"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
@ -200,15 +199,15 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="53dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:src="@drawable/mangguo" /> android:src="@drawable/taosu" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="芒果" android:text="酥饼"
android:textColor="#696969" android:textColor="#696969"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>

@ -87,7 +87,7 @@
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:drawableLeft="@drawable/user_sex" android:drawableLeft="@drawable/user_sex"
android:textColor="#000" android:textColor="#000"
android:text="城市" android:text="性别"
android:gravity="center_vertical" android:gravity="center_vertical"
android:drawablePadding="8dp" android:drawablePadding="8dp"
android:textSize="14sp" android:textSize="14sp"
@ -224,7 +224,7 @@
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:textSize="18sp" android:textSize="18sp"
android:layout_marginTop="150dp" android:layout_marginTop="90dp"
android:text="退出登录" android:text="退出登录"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:layout_gravity="center" android:layout_gravity="center"

@ -19,10 +19,10 @@
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:layout_weight="1" android:layout_weight="1"
android:drawableLeft="@drawable/shuiguo" android:drawableLeft="@drawable/tb"
android:drawablePadding="8dp" android:drawablePadding="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="热门商品" android:text="热门糕点"
android:textColor="#000" android:textColor="#000"
android:textSize="18sp" /> android:textSize="18sp" />

@ -47,7 +47,7 @@
android:textAlignment="center" android:textAlignment="center"
android:maxLength="10" android:maxLength="10"
android:maxLines="1" android:maxLines="1"
android:hint="用户名 10位" /> android:hint="用户名&#160;10位" />
</LinearLayout> </LinearLayout>
@ -70,7 +70,7 @@
android:textAlignment="center" android:textAlignment="center"
android:maxLength="16" android:maxLength="16"
android:maxLines="1" android:maxLines="1"
android:hint="密码 6-16位" /> android:hint="密码&#160;6-16位" />
</LinearLayout> </LinearLayout>
@ -163,6 +163,6 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:background="@drawable/button_login" android:background="@drawable/button_login"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:text="注 册" /> android:text="注 册" />
</LinearLayout> </LinearLayout>

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name">橙一色</string> <string name="app_name">橙一色</string>
<string name="Username">用户名:</string> <string name="Username">用户名:</string>
<string name="Password"> 码:</string> <string name="Password">&#160;&#160;&#160;&#160;码:</string>
</resources> </resources>

@ -1,4 +1,4 @@
package com.example.orangesale_04; package com.example.orangesale_05;
import org.junit.Test; import org.junit.Test;
Loading…
Cancel
Save