master
candy 2 years ago
parent d3596a15a4
commit 8667869cef

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="Android Studio default JDK" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.2" />
</ProjectState>
</option>
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/orangesale" vcs="Git" />
</component>
</project>

@ -0,0 +1,20 @@
Copyright (c) 1995-1999 The Apache Group. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org.
5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their name, without prior written permission of the Apache Group.
6. Redistributions of any form whatsoever must retain the following acknowledgment:
"This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals on behalf of the Apache Group and was originally based on public domain software written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign. For more information on the Apache Group and the Apache HTTP server project, please see <http://www.apache.org/>.

@ -0,0 +1 @@
/build

@ -0,0 +1,50 @@
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.orangesale'
compileSdk 33
defaultConfig {
applicationId "com.example.orangesale"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation 'androidx.navigation:navigation-fragment:2.4.1'
implementation 'androidx.navigation:navigation-ui:2.4.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'liji.library.dev:citypickerview:1.1.0'
}

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

@ -0,0 +1,26 @@
package com.example.orangesale;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.orangesale", appContext.getPackageName());
}
}

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.OrangeSale"
tools:replace="android:theme"
tools:targetApi="31">
<activity
android:name=".ContentActivity"
android:exported="true"></activity>
<activity
android:name=".LoginActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".BuyActivity"
android:exported="true"></activity>
<activity
android:name=".RegisterActivity"
android:exported="true" />
<activity
android:name=".MainActivity"
android:exported="true"></activity>
</application>
</manifest>

@ -0,0 +1,7 @@
package CityPicker;
public interface OnCityItemClickListener {
void onSelected(String... strings);
void onCancel();
}

@ -0,0 +1,7 @@
package com.example.orangesale;
import android.widget.RadioGroup;
public interface AppCompatActivity {
void onCheckedChanged(RadioGroup group, int checkedId);
}

@ -0,0 +1,185 @@
package com.example.orangesale;
import android.app.Fragment;
import android.app.FragmentManager;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.example.orangesale.databinding.ActivityMainBinding;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class BuyActivity extends AppCompatActivity implements View.OnClickListener{
private FragmentManager fragmentManager;
private FragmentTransaction fragmentTransaction;
private Fragment leftFragment;
private RightFragment rightFragment;
private TextView tv_recommed,tv_must_buy;
private String[]names1={"爆款*肥牛鱼豆腐骨肉相连三荤五素一份米饭","豪华双人套餐","【热销】双人套餐(含两份米饭)","家乡菜爆炒花甲","家乡菜八仙过海","家乡菜迷魂汤","家乡菜小肉丸","家乡菜辣子鸡","家乡菜香辣龙虾"};
private String[]sales1={"月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%"};
private String[]prices1={"$23","$41","$32","$23","$41","$32","$23","$41","$32"};
private int []imgs1={R.drawable.recom_one,R.drawable.recom_two,R.drawable.recom_three,R.drawable.recom_four,R.drawable.recom_five,R.drawable.recom_six,R.drawable.recom_seven,R.drawable.recom_eight,R.drawable.recom_nine};
private String[]names2={"素菜主义一人套餐","两人经典套套餐","三人经典套餐"};
private String[]sales2={"月售520 好评度80%","月售520 好评度80%","月售520 好评度80%"};
private String[]prices2={"$23","$41","$32"};
private int []imgs2={R.drawable.must_buy_one,R.drawable.must_buy_two,R.drawable.must_buy_three};
private IndexFragment indexFragment;
private ProductFragment productFragment;
//private ShoppingCartFragment shoppingCartFragment;
private PearsonFragment pearsonFragment;
private LinearLayout indexLine, productLine, pearsonLine;
private Map<String, List<FoodBean>>map;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.buy_food);
setData();
init();
clickEvent();
}
private void init(){//给主页面左侧的fragment界面控件赋值
fragmentManager = getFragmentManager();
leftFragment=fragmentManager.findFragmentById(R.id.left);
tv_recommed=findViewById(R.id.tv_recommend);
tv_must_buy=findViewById(R.id.tv_must_buy);
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);
}
private void setData(){//给数据赋值将其全部放在对应的数据集里
map=new HashMap<>();
List<FoodBean>list1=new ArrayList<>();
List<FoodBean>list2=new ArrayList<>();
for(int i=0;i<names1.length;i++){
FoodBean bean=new FoodBean();
bean.setName(names1[i]);
bean.setPrice(prices1[i]);
bean.setImg(imgs1[i]);
bean.setSales(sales1[i]);
list1.add(bean);
}
map.put("1",list1);
for(int i=0;i<names2.length;i++){
FoodBean bean=new FoodBean();
bean.setName(names2[i]);
bean.setPrice(prices2[i]);
bean.setImg(imgs2[i]);
bean.setSales(sales2[i]);
list2.add(bean);
}
map.put("2",list2);
}
private void clickEvent(){//点击推荐还在必须控件变化颜色,可以增加可适度
tv_recommed.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
switchData (map.get("1"));
tv_recommed.setBackgroundColor(Color.WHITE);
}
});
tv_must_buy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
switchData (map.get("2"));
tv_must_buy.setBackgroundColor(Color.WHITE);
}
});
switchData (map.get("1"));
}
public void switchData(List<FoodBean> list){
rightFragment=new RightFragment().getInstance(list);//实例fragment
fragmentManager=getFragmentManager();//获取FragmentManager
fragmentTransaction=getSupportFragmentManager().beginTransaction();//开启事务
fragmentTransaction.replace(R.id.right,rightFragment);//添加一个Fragment
fragmentTransaction.commit();//提交事务
}
private void initIndexFragment() {
//开启事务fragment的控制是由事务来实现的
android.app.FragmentTransaction transaction = getFragmentManager().beginTransaction();
if (indexFragment == null) {
indexFragment = new IndexFragment();
}
transaction.replace(R.id.buy, indexFragment);
transaction.commit();
}
private void initproductFragment() {
//开启事务fragment的控制是由事务来实现的
android.app.FragmentTransaction transaction = getFragmentManager().beginTransaction();
if (productFragment == null) {
productFragment = new ProductFragment();
}
transaction.replace(R.id.buy, productFragment);
transaction.commit();
}
private void initpearsonFragment() {
//开启事务fragment的控制是由事务来实现的
android.app.FragmentTransaction transaction = getFragmentManager().beginTransaction();
if (pearsonFragment == null) {
Intent intent = BuyActivity.this.getIntent();
Bundle bundle = intent.getExtras();
pearsonFragment = new PearsonFragment();
pearsonFragment.setArguments(bundle);
}
transaction.replace(R.id.buy, pearsonFragment);
transaction.commit();
}
@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;
}
}
}

@ -0,0 +1,88 @@
package com.example.orangesale;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class BuyActivity2 extends AppCompatActivity implements AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener {
private List<Map<String,Object>> data;
private TextView btn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.buy_food2);
btn=findViewById(R.id.tv_order);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(BuyActivity2.this,BuyActivity.class);
startActivity(intent);
}
});
ListView listView = this.findViewById(R.id.list_main);
//准备数据源List<Map>
initData();
//创建自定义适配器
MyAdapter adapter = new MyAdapter(this);
adapter.setList(data);
listView.setAdapter(adapter);
listView.setOnItemClickListener(this);
listView.setOnItemLongClickListener(this);
}
private void initData() {
data = new ArrayList<Map<String, Object>>();
Map<String,Object> map = new HashMap<String,Object>();
map.put("icon",R.drawable.cat);
map.put("title","元培小店");
map.put("content","一家位于元培学院的小吃店,善长做蛋糕,奶茶等甜点,深受广大师生的喜爱。");
data.add(map);
map = new HashMap<String ,Object>();
map.put("icon",R.drawable.fawn);
map.put("title","古卉");
map.put("content","一家位于悦享城的小吃店,因为老板的漂亮可爱而深受众多男同学的光临。");
data.add(map);
map = new HashMap<String ,Object>();
map.put("icon",R.drawable.tiger);
map.put("title","河南烩面");
map.put("content","一家位于绍兴却只做河南烩面的小吃店,色香味俱全,吸引了众多当地人的光临,尤其是在绍兴本地工作的河南朋友。");
data.add(map);
map = new HashMap<String ,Object>();
map.put("icon",R.drawable.siberiankusky);
map.put("title","麻辣烫");
map.put("content","以众多荤菜和素材混合搭配制作,价格便宜,回味无穷。");
data.add(map);
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Toast.makeText(this,"点击item"+i,Toast.LENGTH_SHORT).show();
}
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
Toast.makeText(this,"长按item"+i,Toast.LENGTH_SHORT).show();
return true;//事件流机制
}
}

@ -0,0 +1,70 @@
package com.example.orangesale;
import static com.example.orangesale.R.*;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class ContentActivity extends AppCompatActivity {
private ImageView userIconImage;
private TextView usernameText, userSexText, userCityText;
private LinearLayout usernameLine, userSexline, userCityLine, userPayLine, userSettingLine, userGeneralLine;
@Override
protected void onCreate(Bundle savedInstanceState) {
Button btn1,btn2;
super.onCreate(savedInstanceState);
setContentView(layout.content_user);
btn1 = (Button) findViewById(id.wipe);
btn2 = (Button) findViewById(R.id.look);
btn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(ContentActivity.this, LoginActivity.class);
startActivity(intent);
}
});
btn2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(ContentActivity.this, BuyActivity.class);
startActivity(intent);
}
});
userIconImage = findViewById(id.user_icon);
usernameText = findViewById(id.user_username);
userSexText = findViewById(id.user_sex);
userCityText = findViewById(id.user_city);
usernameLine = findViewById(id.user_username_line);
userSexline = findViewById(id.user_sex_line);
userCityLine = findViewById(id.user_city_line);
userPayLine = findViewById(id.user_pay);
userSettingLine = findViewById(id.user_setting);
userGeneralLine = findViewById(id.user_general);
Intent intent = ContentActivity.this.getIntent();
Bundle bundle = intent.getExtras();
usernameText.setText(String.format("用户名:%s", bundle.getString("username")));
userSexText.setText(String.format("性别:%s", bundle.getString("sex")));
userCityText.setText(String.format("城市:%s", bundle.getString("city")));
}
}

@ -0,0 +1,42 @@
package com.example.orangesale;
import java.io.Serializable;
public class FoodBean implements Serializable {
private static final long serialVersionUID=1L;
private String name;
private String sales;
private String price;
private int img;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSales() {
return sales;
}
public void setSales(String sales) {
this.sales = sales;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public int getImg() {
return img;
}
public void setImg(int img) {
this.img = img;
}
}

@ -0,0 +1,128 @@
package com.example.orangesale;
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.example.orangesale.ProductFragment;
//import com.example.orangesale.ShoppingCartFragment;
//import com.example.orangesale.TimeService;
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();
// Thread thread = new Thread(runnable);
// thread.start();
}
/**
*
*/
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() {
// Intent intent = new Intent(this, BuyActivity.class);
// startActivity(intent);
// 开启事务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();
}
// Runnable runnable = () -> {
// Intent intent = new Intent(IndexActivity.this, TimeService.class);
// startService(intent);
// };
}

@ -0,0 +1,109 @@
package com.example.orangesale;
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.example.orangesale.ProductAdapter;
import com.example.orangesale.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 orangeLine, youziLine, juziLine, xiguaLine, liLine, appleLine, lemonLine, mangguoLine;
private GridView gridView;
private ProductAdapter productAdapter;
private List<Product> productList;
@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);
orangeLine = view.findViewById(R.id.chengzi);
orangeLine.setOnClickListener(this);
youziLine = view.findViewById(R.id.youzi);
youziLine.setOnClickListener(this);
juziLine = view.findViewById(R.id.juzi);
juziLine.setOnClickListener(this);
xiguaLine = view.findViewById(R.id.xigua);
xiguaLine.setOnClickListener(this);
liLine = view.findViewById(R.id.li);
liLine.setOnClickListener(this);
lemonLine = view.findViewById(R.id.lemon);
lemonLine.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.a1);
product.setProductName("热卤");
product.setProductPrice(new BigDecimal("9.9"));
Product product1 = new Product();
product1.setImageUrlId(R.drawable.a2);
product1.setProductName("牛肉");
product1.setProductPrice(new BigDecimal("35"));
Product product2 = new Product();
product2.setImageUrlId(R.drawable.a3);
product2.setProductName("香菜牛肉");
product2.setProductPrice(new BigDecimal("35"));
Product product3 = new Product();
product3.setImageUrlId(R.drawable.a4);
product3.setProductName("千叶豆腐");
product3.setProductPrice(new BigDecimal("15"));
Product product4 = new Product();
product4.setImageUrlId(R.drawable.a5);
product4.setProductName("宫保鸡丁");
product4.setProductPrice(new BigDecimal("30"));
Product product5 = new Product();
product5.setImageUrlId(R.drawable.a6);
product5.setProductName("花甲");
product5.setProductPrice(new BigDecimal("25"));
productList.add(product);
productList.add(product1);
productList.add(product2);
productList.add(product3);
productList.add(product4);
productList.add(product5);
}
}

@ -0,0 +1,29 @@
package com.example.orangesale;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
public class LeftFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view= inflater.inflate(R.layout.fragment_left, container, false);
return view;
}
public void onPause(){
super.onPause();
}
}

@ -0,0 +1,75 @@
package com.example.orangesale;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class LoginActivity extends AppCompatActivity implements View.OnClickListener {
private Button registerButton, loginButton;
private EditText usernameText, paswdEdit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_login);
init();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.register:
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
startActivity(intent);
break;
case R.id.login:
//注册时,我们引入了数据库,登录这里可以通过数据库进行验证,验证跳转到首页,不通过进行提示
if (validateLogin()) {
Intent intent1 = new Intent(LoginActivity.this, ContentActivity.class);
Bundle bundle = new Bundle();
OrangeDatabase orangeDatabase = new OrangeDatabase(LoginActivity.this);
bundle.putString("username", usernameText.getText().toString());
bundle = orangeDatabase.queryUserInfo(orangeDatabase.getReadableDatabase(), bundle);
intent1.putExtras(bundle);
startActivity(intent1);
} else {
Toast.makeText(LoginActivity.this, "账号或者密码错误", Toast.LENGTH_SHORT).show();
}
break;
}
}
//界面组件初始化
private void init() {
usernameText = findViewById(R.id.username);
paswdEdit = findViewById(R.id.password);
loginButton = findViewById(R.id.login);
loginButton.setOnClickListener(this);
registerButton = findViewById(R.id.register);
registerButton.setOnClickListener(this);
}
/**
*
*
* @return
*/
private boolean validateLogin() {
String username = usernameText.getText().toString();
String password = paswdEdit.getText().toString();
OrangeDatabase orangeDatabase = new OrangeDatabase(LoginActivity.this);
SQLiteDatabase sqLiteDatabase = orangeDatabase.getReadableDatabase();
Cursor cursor = sqLiteDatabase.rawQuery("select * from orange_user where username=? and password=?", new String[]{username, password});
if (cursor.getCount() > 0) {
return true;
}
return false;
}
}

@ -0,0 +1,14 @@
package com.example.orangesale;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}

@ -0,0 +1,74 @@
package com.example.orangesale;
import android.content.Context;
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 java.util.List;
import java.util.Map;
public class MyAdapter extends BaseAdapter {
private List<Map<String,Object>> list;
private LayoutInflater inflater;//反射器
public MyAdapter(Context context) {
this.inflater = LayoutInflater.from(context);
}
public void setList(List<Map<String, Object>> list) {
this.list = list;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int i) {
return list.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
// View view1 = inflater.inflate(R.layout.layout_item,null);
ViewHolder holder = null;
if(view == null){
view = inflater.inflate(R.layout.layout_item,null);
holder = new ViewHolder();
holder.icon = view.findViewById(R.id.icon);
holder.title = view.findViewById(R.id.title);
holder.content = view.findViewById(R.id.content);
view.setTag(holder);
}else {
holder = (ViewHolder) view.getTag();
}
//获得行布局的各个控件
// ImageView icon = view.findViewById(R.id.icon);
// TextView title = view.findViewById(R.id.title);
// TextView content = view.findViewById(R.id.content);
//给各个控件赋值
holder.icon.setImageResource((Integer) list.get(i).get("icon"));
holder.title.setText((String) list.get(i).get("title"));
holder.content.setText((String) list.get(i).get("content"));
return view;
}
public class ViewHolder{
ImageView icon;
TextView title;
TextView content;
}
}

@ -0,0 +1,54 @@
package com.example.orangesale;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
import androidx.annotation.Nullable;
public class OrangeDatabase extends SQLiteOpenHelper {
public OrangeDatabase(@Nullable Context context) {
super(context, "orange", null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
//创建用户表
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);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
//插入数据
public void insertUser(SQLiteDatabase sqLiteDatabase, String username, String password, String sex, String city) {
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("sex", sex);
contentValues.put("city", city);
sqLiteDatabase.insert("orange_user", null, contentValues);
sqLiteDatabase.close();
}
//查询数据
public Bundle queryUserInfo(SQLiteDatabase sqLiteDatabase, Bundle bundle) {
String username = bundle.getString("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));
bundle.putString("city", cursor.getString(4));
}
}
cursor.close();
sqLiteDatabase.close();
return bundle;
}
}

@ -0,0 +1,59 @@
package com.example.orangesale;
public class OrangeUser {
private Integer id;
private String username;
private String password;
private String sex;
private String city;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public String toString() {
return "OrangeUser{" +
"username='" + username + '\'' +
", password='" + password + '\'' +
", sex='" + sex + '\'' +
", city='" + city + '\'' +
'}';
}
}

@ -0,0 +1,62 @@
package com.example.orangesale;
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;
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) {
}
}

@ -0,0 +1,43 @@
package com.example.orangesale;
import java.math.BigDecimal;
public class Product {
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public BigDecimal getProductPrice() {
return productPrice;
}
public void setProductPrice(BigDecimal productPrice) {
this.productPrice = productPrice;
}
public Integer getImageUrlId() {
return imageUrlId;
}
public void setImageUrlId(Integer imageUrlId) {
this.imageUrlId = imageUrlId;
}
private Integer imageUrlId;
private String productName;
private BigDecimal productPrice;
@Override
public String toString() {
return "Product{" +
"imageUrlId=" + imageUrlId +
", productName='" + productName + '\'' +
", productPrice=" + productPrice +
'}';
}
}

@ -0,0 +1,68 @@
package com.example.orangesale;
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.example.orangesale.Product;
import java.util.List;
public class ProductAdapter extends BaseAdapter {
private List<Product> productList;
private LayoutInflater layoutInflater;
public ProductAdapter(Context context, List<Product> 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;
}
}

@ -0,0 +1,19 @@
package com.example.orangesale;
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;
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.buy_food, container, false);
return view;
}
}

@ -0,0 +1,162 @@
package com.example.orangesale;
import android.content.ContentValues;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.lljjcoder.citypickerview.widget.CityPicker;
public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, com.example.orangesale.AppCompatActivity, RadioGroup.OnCheckedChangeListener {
private EditText usernameEdit, passwordEdit, surePasswordEdit;
private CityPicker cityPicker;
private TextView cityText;
private RadioGroup sexGroup;
private String sexstr;//默认值为男
private Button regButton;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_register);
Button register = findViewById(R.id.reg_register);
register.setOnClickListener(this);
init();
}
private void init() {
cityText = findViewById(R.id.reg_province);
cityText.setOnClickListener(this);
usernameEdit = findViewById(R.id.reg_username);
passwordEdit = findViewById(R.id.reg_psw);
surePasswordEdit = findViewById(R.id.reg_sure_psw);
regButton = findViewById(R.id.reg_register);
regButton.setOnClickListener(this);
sexGroup = findViewById(R.id.sex);
sexGroup.setOnCheckedChangeListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.reg_province:
initCityPicker();
cityPicker.show();
break;
case R.id.reg_register:
validateRegister();
break;
}
// Intent intent = new Intent(this, LoginActivity.class);
// startActivity(intent);
}
private void validateRegister() {
Intent intent = new Intent(RegisterActivity.this, ContentActivity.class);
String username = usernameEdit.getText().toString();
String password = passwordEdit.getText().toString();
String surePassword = surePasswordEdit.getText().toString();
String city = cityText.getText().toString();
//两次密码对照确认
if (password.equals(surePassword)){
if (password.equals("") || !password.equals("")) {
if (!city.equals("")) {
Bundle bundle = new Bundle();
bundle.putString("username", username);
bundle.putString("password", password);
bundle.putString("sex", sexstr);
bundle.putString("city", city);
OrangeDatabase orangeDatabase = new OrangeDatabase(RegisterActivity.this);
SQLiteDatabase sqLiteDatabase = orangeDatabase.getWritableDatabase();
insertData(sqLiteDatabase,bundle);
intent.putExtras(bundle);
startActivity(intent);
}
else {
Toast.makeText(RegisterActivity.this, "请选择地址", Toast.LENGTH_LONG).show();
}
}
else {
Toast.makeText(RegisterActivity.this, "账号或者密码未填写", Toast.LENGTH_LONG).show();
}
}
else{
Toast.makeText(RegisterActivity.this,"两次密码输入不一致",Toast.LENGTH_LONG).show();
}
}
private void insertData(SQLiteDatabase sqLiteDatabase, Bundle bundle) {
ContentValues contentValues = new ContentValues();
contentValues.put("username",bundle.getString("username"));
contentValues.put("password",bundle.getString("password"));
contentValues.put("sex",bundle.getString("sex"));
contentValues.put("city",bundle.getString("city"));
sqLiteDatabase.insert("orange_user",null,contentValues);
sqLiteDatabase.close();
}
@Override
public void onCheckedChanged(RadioGroup group, int checkedId){
sexstr = checkedId==R.id.reg_man?"男":"女";
}
public void initCityPicker() {
cityPicker = new CityPicker.Builder(RegisterActivity.this)
.textSize(16)
.title("地址选择")
.backgroundPop(0xa0000000)
.titleBackgroundColor("#EFB81C")
.titleTextColor("#000000")
.backgroundPop(0xa0000000)
.confirTextColor("#000000")
.cancelTextColor("#000000")
.province("江西省")
.city("赣州市")
.district("章贡区")
.textColor(Color.parseColor("#000000"))
.provinceCyclic(true)
.cityCyclic(false)
.districtCyclic(false)
.visibleItemsCount(7)
.itemPadding(10)
.onlyShowProvinceAndCity(false)
.build();
cityPicker.setOnCityItemClickListener(new CityPicker.OnCityItemClickListener() {
@Override
public void onSelected(String... strings) {
String province = strings[0];
String city = strings[1];
String district = strings[2];
cityText.setText(String.format("%s %s %s", province, city, district));
}
@Override
public void onCancel() {
}
});
}
@Override
public void onPointerCaptureChanged(boolean hasCapture) {
super.onPointerCaptureChanged(hasCapture);
}
}

@ -0,0 +1,59 @@
package com.example.orangesale;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
public class RightAdapter extends BaseAdapter {
private Context mContext;
private List<FoodBean>list;
public RightAdapter(Context context , List<FoodBean>list){
this.mContext=context;
this.list=list;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder=null;
if(convertView==null){
convertView=View.inflate(mContext,R.layout.list_item,null);
holder= new ViewHolder();
holder.tv_name=convertView.findViewById(R.id.tv_name);
holder.tv_sale=convertView.findViewById(R.id.tv_sale);
holder.tv_price=convertView.findViewById(R.id.tv_price);
holder.iv_img=convertView.findViewById(R.id.iv_img);
convertView.setTag(holder);
}else {
holder=(ViewHolder) convertView.getTag();
}
FoodBean bean=list.get(position);
holder.tv_name.setText(bean.getName());
holder.tv_sale.setText(bean.getSales());
holder.tv_price.setText(bean.getPrice());
holder.iv_img.setBackgroundResource(bean.getImg());
return convertView;
}
class ViewHolder{
TextView tv_name,tv_sale,tv_price;
ImageView iv_img;
}
}

@ -0,0 +1,60 @@
package com.example.orangesale;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import androidx.fragment.app.Fragment;
import java.io.Serializable;
import java.util.List;
public class RightFragment extends Fragment {
private ListView lv_list;
/* public RightFragment(FragmentActivity activity, List<FoodBean> list) {
// Required empty public constructor
}*/
public RightFragment() {
}
public RightFragment getInstance(List<FoodBean>list){
RightFragment rightFragment=new RightFragment();
Bundle bundle=new Bundle();
bundle.putSerializable("list",(Serializable) list);
rightFragment.setArguments(bundle);
return rightFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view=inflater.inflate(R.layout.fragment_right, container, false);
lv_list=view.findViewById(R.id.lv_list);
if(getArguments()!=null){
List<FoodBean>list=(List<FoodBean>) getArguments().getSerializable("list");
RightAdapter adapter=new RightAdapter(getActivity(),list);
lv_list.setAdapter( adapter);
}
return view;
}
}

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 B

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
</vector>

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 连框颜色值 -->
<item>
<shape>
<solid android:color="#dddddd" />
</shape>
</item>
<!-- 主体背景颜色值 -->
<item android:bottom="1dp"> <!--设置只有底部有边框-->
<shape>
<solid android:color="#ffffff" />
<corners android:radius="10dp"></corners>
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save