@ -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 @@
|
|||||||
|
OrangeSale
|
@ -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,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,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>
|
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 368 B |
After Width: | Height: | Size: 231 B |
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>
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 790 B |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 1.4 KiB |
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>
|
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>
|
After Width: | Height: | Size: 412 KiB |
After Width: | Height: | Size: 248 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 419 KiB |
After Width: | Height: | Size: 409 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 219 KiB |
After Width: | Height: | Size: 295 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 14 KiB |