@ -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 @@
|
||||
Fruit and Vegetable Appointments Application
|
@ -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,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_login.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_main.xml" value="0.20168066580377575" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_register.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_shucai.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_taolun.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_welcome.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_wode.xml" value="0.223731884057971" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/activity_yuyuexuanze.xml" value="0.1" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/layout.xml" value="0.23854166666666668" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/taolun_item_layout.xml" value="0.12310030395136778" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/tuijian_item_layout.xml" value="0.1" />
|
||||
<entry key="..\:/Androidfiles/AndroidStudioprojects/FruitandVegetableAppointmentsApplication/app/src/main/res/layout/yuyue_item_layout.xml" value="0.223731884057971" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<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>
|
||||
</project>
|
@ -0,0 +1,31 @@
|
||||
@startuml
|
||||
|
||||
title __FRUIT AND VEGETABLE APPOINTMENTS APPLICATION's Component Diagram__\n
|
||||
|
||||
component "Fruit_and_Vegetable_Appointments_Application.app.unitTest" {
|
||||
[Fruit_and_Vegetable_Appointments_Application.app.main]
|
||||
component "Fruit_and_Vegetable_Appointments_Application.app.main" {
|
||||
[Fruit_and_Vegetable_Appointments_Application.app.androidTest]
|
||||
component "Fruit_and_Vegetable_Appointments_Application.app.androidTest" {
|
||||
[Fruit_and_Vegetable_Appointments_Application.app]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Fruit_and_Vegetable_Appointments_Application.app.androidTest] --> [Fruit_and_Vegetable_Appointments_Application.app.main]
|
||||
[Fruit_and_Vegetable_Appointments_Application.app.unitTest] --> [Fruit_and_Vegetable_Appointments_Application.app.main]
|
||||
|
||||
|
||||
right footer
|
||||
|
||||
|
||||
PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
|
||||
For more information about this tool, please contact philippe.mesmeur@gmail.com
|
||||
endfooter
|
||||
|
||||
@enduml
|
@ -0,0 +1 @@
|
||||
Subproject commit e986c0ec9b346572151d49fcb6a139a29fd8cb69
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,38 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.fruitandvegetableappointmentsapplication"
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.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.fruitandvegetableappointmentsapplication;
|
||||
|
||||
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.fruitandvegetableappointmentsapplication", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.example.fruitandvegetableappointmentsapplication">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@drawable/tubiao"
|
||||
android:label="极预约"
|
||||
android:roundIcon="@drawable/tubiao"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.FruitAndVegetableAppointmentsApplication"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".welcome"
|
||||
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=".register"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".login"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".wode"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".taolun"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".yuyuexuanze"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".shucai_activity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="false">
|
||||
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,30 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
public class DBHelper extends SQLiteOpenHelper {
|
||||
|
||||
public static final String DATABASE_NAME = "fruit.db";
|
||||
|
||||
private static final int DATABASE_VERSION = 1;
|
||||
|
||||
public DBHelper(Context context) {
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
}
|
||||
|
||||
final String CREATE_TABLE_SQL1="create table if not exists user(_id integer primary key autoincrement ,username,password)";
|
||||
final String CREATE_TABLE_SQL2="create table if not exists pinglun(_id integer primary key autoincrement ,userid,pinglun)";
|
||||
final String CREATE_TABLE_SQL3="create table if not exists yuyue(_id integer primary key autoincrement ,userid,pinzhong,data)";
|
||||
public void onCreate(SQLiteDatabase sqLitedatabase){
|
||||
sqLitedatabase.execSQL(CREATE_TABLE_SQL1);
|
||||
sqLitedatabase.execSQL(CREATE_TABLE_SQL2);
|
||||
sqLitedatabase.execSQL(CREATE_TABLE_SQL3);
|
||||
}
|
||||
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion){
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
private Button shouye,yuyue,taolun,wode;
|
||||
private ViewHolder holder;
|
||||
private Tuijian tuijian;
|
||||
String name=null;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
ListView mLvTuijian=findViewById(R.id.tuijian);
|
||||
initView();
|
||||
tuijian=new Tuijian();
|
||||
Newadptor newadptor =new Newadptor();
|
||||
mLvTuijian.setAdapter(newadptor);
|
||||
Intent intent=this.getIntent();
|
||||
name=intent.getStringExtra("username");
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
shouye= findViewById(R.id.shouye);
|
||||
yuyue= findViewById(R.id.yuyue);
|
||||
taolun= findViewById(R.id.taolun);
|
||||
wode=findViewById(R.id.wode);
|
||||
|
||||
yuyue.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent1=new Intent(MainActivity.this,shucai_activity.class);
|
||||
intent1.putExtra("username", name);
|
||||
startActivity(intent1);
|
||||
}
|
||||
});
|
||||
|
||||
taolun.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
Intent intent2=new Intent(MainActivity.this,taolun.class);
|
||||
intent2.putExtra("username", name);
|
||||
startActivity(intent2);
|
||||
}
|
||||
});
|
||||
|
||||
wode.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent3=new Intent(MainActivity.this,wode.class);
|
||||
intent3.putExtra("username", name);
|
||||
startActivity(intent3);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private class Newadptor extends BaseAdapter{
|
||||
@Override
|
||||
public int getCount() {
|
||||
return Tuijian.getNames().length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return Tuijian.getNames()[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View cview, ViewGroup viewGroup) {
|
||||
if(cview==null){
|
||||
cview=View.inflate(MainActivity.this,R.layout.tuijian_item_layout,null);
|
||||
holder =new ViewHolder();
|
||||
holder.title=cview.findViewById(R.id.tuijian_title);
|
||||
holder.news=cview.findViewById(R.id.tuijian_text);
|
||||
holder.img=cview.findViewById(R.id.tuijian_img);
|
||||
|
||||
cview.setTag(holder);
|
||||
}else{
|
||||
holder=(ViewHolder) cview.getTag();
|
||||
}
|
||||
|
||||
holder.title.setText(Tuijian.getNames()[i]);
|
||||
holder.news.setText(Tuijian.getNews()[i]);
|
||||
holder.img.setBackgroundResource(Tuijian.getIcons()[i]);
|
||||
return cview;
|
||||
}
|
||||
}
|
||||
private class ViewHolder{
|
||||
private TextView title;
|
||||
private TextView news;
|
||||
private ImageView img;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
public class Tuijian {
|
||||
|
||||
private static String[] names={"鸿星尔克","安踏","森马","回力","特步"};
|
||||
private static String[] news={"鸿星尔克男鞋红星运动鞋男春夏季新款飞织透气网面男士潮流跑步休闲鞋子男 正黑/国王金(飞织)",
|
||||
"安踏运动鞋男鞋夏季网面透气跑步鞋子男轻便软底耐磨减震户外鞋",
|
||||
"森马 Senma 时尚经典韩版飞织网面运动鞋套脚舒适软底轻便户外透气百搭休闲鞋男211120303 白灰色 ",
|
||||
"回力男鞋板鞋男春夏季透气韩版男士休闲小白鞋百搭学生潮流运动鞋子 白蓝",
|
||||
"特步男鞋板鞋男夏季国潮休闲鞋子男时尚百搭厚底减震网面透气运动鞋男 白兰-潮流鞋身(推荐)"};
|
||||
|
||||
private static int[] icons={R.drawable.shoes1,R.drawable.shoes2,R.drawable.shoes3,R.drawable.shoes4,R.drawable.shoes5};
|
||||
|
||||
public static String[] getNames() {
|
||||
return names;
|
||||
}
|
||||
|
||||
public static String[] getNews() {
|
||||
return news;
|
||||
}
|
||||
|
||||
public static int[] getIcons() {
|
||||
return icons;
|
||||
}
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
@startuml
|
||||
|
||||
title __FRUITANDVEGETABLEAPPOINTMENTSAPPLICATION's Class Diagram__\n
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.DBHelper {
|
||||
{static} + DATABASE_NAME : String
|
||||
~ CREATE_TABLE_SQL1 : String
|
||||
~ CREATE_TABLE_SQL2 : String
|
||||
~ CREATE_TABLE_SQL3 : String
|
||||
{static} - DATABASE_VERSION : int
|
||||
+ DBHelper()
|
||||
+ onCreate()
|
||||
+ onUpgrade()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.MainActivity {
|
||||
~ name : String
|
||||
- shouye : Button
|
||||
- taolun : Button
|
||||
- wode : Button
|
||||
- yuyue : Button
|
||||
# onCreate()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.MainActivity.Newadptor {
|
||||
+ getCount()
|
||||
+ getItem()
|
||||
+ getItemId()
|
||||
+ getView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.MainActivity.ViewHolder {
|
||||
- img : ImageView
|
||||
- news : TextView
|
||||
- title : TextView
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.Tuijian {
|
||||
{static} - icons : int[]
|
||||
{static} - names : String[]
|
||||
{static} - news : String[]
|
||||
{static} + getIcons()
|
||||
{static} + getNames()
|
||||
{static} + getNews()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.login {
|
||||
~ login : Button
|
||||
~ password : EditText
|
||||
~ register : Button
|
||||
~ username : EditText
|
||||
# onCreate()
|
||||
# onDestroy()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.register {
|
||||
~ checkpassword : EditText
|
||||
~ inlogin : Button
|
||||
~ password : EditText
|
||||
~ register : Button
|
||||
~ username : EditText
|
||||
- db : SQLiteDatabase
|
||||
# onCreate()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.shucai_activity {
|
||||
~ name : String
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.shucai_activity.ViewHolder {
|
||||
- img : ImageView
|
||||
- news : TextView
|
||||
- title : TextView
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.shucai_activity.Yuyueadaptor {
|
||||
+ getCount()
|
||||
+ getItem()
|
||||
+ getItemId()
|
||||
+ getView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.taolun {
|
||||
~ name : String
|
||||
- mBtn_insert : Button
|
||||
- mDbWriter : SQLiteDatabase
|
||||
- mListView : ListView
|
||||
- mSimpleCursorAdapter : SimpleCursorAdapter
|
||||
- wenben : EditText
|
||||
+ deleteData()
|
||||
+ insertData()
|
||||
+ refreshListview()
|
||||
# onCreate()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.welcome {
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.wode {
|
||||
~ login : Button
|
||||
~ more : Button
|
||||
~ name : String
|
||||
~ username2 : TextView
|
||||
# onCreate()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.fruitandvegetableappointmentsapplication {
|
||||
class com.example.fruitandvegetableappointmentsapplication.yuyuexuanze {
|
||||
~ name : String
|
||||
~ text1 : TextView
|
||||
~ text2 : TextView
|
||||
~ text3 : TextView
|
||||
~ text4 : TextView
|
||||
- backbutton : Button
|
||||
- button1 : Button
|
||||
- button2 : Button
|
||||
- button3 : Button
|
||||
- button4 : Button
|
||||
- day : int
|
||||
- mDbWriter : SQLiteDatabase
|
||||
- month : int
|
||||
- year : int
|
||||
# onCreate()
|
||||
- initView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
com.example.fruitandvegetableappointmentsapplication.DBHelper -up-|> android.database.sqlite.SQLiteOpenHelper
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity o-- com.example.fruitandvegetableappointmentsapplication.MainActivity.ViewHolder : holder
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity o-- com.example.fruitandvegetableappointmentsapplication.Tuijian : tuijian
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity +-down- com.example.fruitandvegetableappointmentsapplication.MainActivity.Newadptor
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity +-down- com.example.fruitandvegetableappointmentsapplication.MainActivity.ViewHolder
|
||||
com.example.fruitandvegetableappointmentsapplication.MainActivity.Newadptor -up-|> android.widget.BaseAdapter
|
||||
com.example.fruitandvegetableappointmentsapplication.login -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.login o-- com.example.fruitandvegetableappointmentsapplication.DBHelper : dbHelper
|
||||
com.example.fruitandvegetableappointmentsapplication.register -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.register o-- com.example.fruitandvegetableappointmentsapplication.DBHelper : dbHelper
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity o-- com.example.fruitandvegetableappointmentsapplication.shucai_activity.ViewHolder : holder
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity o-- com.example.fruitandvegetableappointmentsapplication.Tuijian : tuijian
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity +-down- com.example.fruitandvegetableappointmentsapplication.shucai_activity.ViewHolder
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity +-down- com.example.fruitandvegetableappointmentsapplication.shucai_activity.Yuyueadaptor
|
||||
com.example.fruitandvegetableappointmentsapplication.shucai_activity.Yuyueadaptor -up-|> android.widget.BaseAdapter
|
||||
com.example.fruitandvegetableappointmentsapplication.taolun -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.taolun o-- com.example.fruitandvegetableappointmentsapplication.DBHelper : dbhelper
|
||||
com.example.fruitandvegetableappointmentsapplication.welcome -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.wode -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.yuyuexuanze -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.fruitandvegetableappointmentsapplication.yuyuexuanze o-- com.example.fruitandvegetableappointmentsapplication.DBHelper : dbhelper
|
||||
|
||||
|
||||
right footer
|
||||
|
||||
|
||||
PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
|
||||
For more information about this tool, please contact philippe.mesmeur@gmail.com
|
||||
endfooter
|
||||
|
||||
@enduml
|
@ -0,0 +1,83 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class login extends AppCompatActivity {
|
||||
DBHelper dbHelper;
|
||||
EditText username;
|
||||
EditText password;
|
||||
Button login;
|
||||
Button register;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
dbHelper=new DBHelper(this);
|
||||
initView();
|
||||
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
|
||||
String name=username.getText().toString();
|
||||
String pwd=password.getText().toString();
|
||||
|
||||
|
||||
Cursor cursor=dbHelper.getReadableDatabase().query("user",null,"username=? and password=?",new String[]{name,pwd},null,null,null);
|
||||
ArrayList<Map<String,String>> resultList=new ArrayList<Map<String,String>>();
|
||||
|
||||
while (cursor.moveToNext()){
|
||||
Map<String,String> map=new HashMap<String, String>();
|
||||
map.put("name",cursor.getString(1));
|
||||
resultList.add(map);
|
||||
}
|
||||
if (resultList==null || resultList.size()==0){
|
||||
Toast.makeText(login.this,"账户或密码错误!",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else {
|
||||
Toast.makeText(login.this,"登录成功!",Toast.LENGTH_SHORT).show();
|
||||
Intent intent=new Intent(login.this,MainActivity.class);
|
||||
intent.putExtra("username",name);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
register.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent=new Intent(login.this,register.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
private void initView() {
|
||||
username=findViewById(R.id.username);
|
||||
password=findViewById(R.id.password);
|
||||
login=findViewById(R.id.login);
|
||||
register=findViewById(R.id.register);
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(dbHelper!=null){
|
||||
dbHelper.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.ContentValues;
|
||||
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;
|
||||
|
||||
public class register extends AppCompatActivity {
|
||||
DBHelper dbHelper;
|
||||
EditText username;
|
||||
EditText password;
|
||||
EditText checkpassword;
|
||||
Button register;
|
||||
Button inlogin;
|
||||
private SQLiteDatabase db;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_register);
|
||||
|
||||
dbHelper=new DBHelper(this);
|
||||
db = dbHelper .getWritableDatabase();
|
||||
initView();
|
||||
|
||||
inlogin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent=new Intent(register.this,login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
register.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String name=username.getText().toString();
|
||||
String pwd=password.getText().toString();
|
||||
String pwd2=checkpassword.getText().toString();
|
||||
if (!(name.isEmpty()||pwd.isEmpty()))
|
||||
{
|
||||
|
||||
if ((pwd).equals(pwd2)) {
|
||||
Cursor cursor = db.rawQuery(
|
||||
"select count(*) from user where username = '"
|
||||
+ name + "'",
|
||||
null);
|
||||
cursor.moveToNext();
|
||||
int count = cursor.getInt(0);
|
||||
if (count == 0) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("username", name);
|
||||
values.put("password", pwd);
|
||||
db.insert("user", null, values);
|
||||
Toast.makeText(register.this, "注册成功!",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
username.setText("");
|
||||
password.setText("");
|
||||
checkpassword.setText("");
|
||||
}
|
||||
else {
|
||||
Toast.makeText(register.this, "您注册的用户名已存在!",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
cursor.close();
|
||||
}
|
||||
else {
|
||||
Toast.makeText(register.this, "您两次输入的密码不一样!",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
else if(name.isEmpty()){
|
||||
Toast.makeText(register.this, "用户名不能为空",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if (pwd.isEmpty()){
|
||||
Toast.makeText(register.this, "密码不能为空",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
username=findViewById(R.id.username1);
|
||||
password=findViewById(R.id.password1);
|
||||
checkpassword=findViewById(R.id.password2);
|
||||
register=findViewById(R.id.confirm);
|
||||
inlogin=findViewById(R.id.back);
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class shucai_activity extends AppCompatActivity {
|
||||
private ViewHolder holder;
|
||||
private Tuijian tuijian;
|
||||
String name;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_shucai);
|
||||
|
||||
Intent intent=getIntent();
|
||||
name=intent.getStringExtra("username");
|
||||
ListView mLvshucai=findViewById(R.id.yuyue);
|
||||
|
||||
tuijian=new Tuijian();
|
||||
|
||||
Yuyueadaptor yuyueadaptor=new Yuyueadaptor();
|
||||
mLvshucai.setAdapter(yuyueadaptor);
|
||||
|
||||
mLvshucai.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
Intent intent3=new Intent(shucai_activity.this,yuyuexuanze.class);
|
||||
intent3.putExtra("username",name);
|
||||
startActivity(intent3);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private class Yuyueadaptor extends BaseAdapter{
|
||||
@Override
|
||||
public int getCount() {
|
||||
return Tuijian.getNames().length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return Tuijian.getNames()[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View cview, ViewGroup viewGroup) {
|
||||
if(cview==null){
|
||||
cview=View.inflate(shucai_activity.this,R.layout.tuijian_item_layout,null);
|
||||
holder =new ViewHolder();
|
||||
holder.title=cview.findViewById(R.id.tuijian_title);
|
||||
holder.news=cview.findViewById(R.id.tuijian_text);
|
||||
holder.img=cview.findViewById(R.id.tuijian_img);
|
||||
|
||||
cview.setTag(holder);
|
||||
}else{
|
||||
holder=(ViewHolder) cview.getTag();
|
||||
}
|
||||
|
||||
holder.title.setText(Tuijian.getNames()[i]);
|
||||
holder.news.setText(Tuijian.getNews()[i]);
|
||||
holder.img.setBackgroundResource(Tuijian.getIcons()[i]);
|
||||
return cview;
|
||||
}
|
||||
}
|
||||
|
||||
private class ViewHolder{
|
||||
private TextView title;
|
||||
private TextView news;
|
||||
private ImageView img;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
autonumber
|
||||
|
||||
Alice -> Bob: Authentication Request
|
||||
Bob --> Alice: Authentication Response
|
||||
|
||||
Alice -> Bob: Another authentication Request
|
||||
Alice <-- Bob: another authentication Response
|
||||
@enduml
|
@ -0,0 +1,102 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ContentValues;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
import android.widget.CursorAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class taolun extends AppCompatActivity {
|
||||
private ListView mListView;
|
||||
private Button mBtn_insert;
|
||||
private EditText wenben;
|
||||
private SimpleCursorAdapter mSimpleCursorAdapter;
|
||||
private SQLiteDatabase mDbWriter;
|
||||
private DBHelper dbhelper;
|
||||
String name=null;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_taolun);
|
||||
initView();
|
||||
|
||||
Intent intent=this.getIntent();
|
||||
name=intent.getStringExtra("username");
|
||||
|
||||
mBtn_insert.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
insertData();
|
||||
wenben.setText("");
|
||||
}
|
||||
});
|
||||
|
||||
dbhelper=new DBHelper(this);
|
||||
mDbWriter = dbhelper.getWritableDatabase();
|
||||
|
||||
mSimpleCursorAdapter =new SimpleCursorAdapter(taolun.this,R.layout.taolun_item_layout,null,
|
||||
new String[]{"userid","pinglun"},new int[]{R.id.id,R.id.pinglunlist}, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
|
||||
mListView.setAdapter(mSimpleCursorAdapter);
|
||||
refreshListview();
|
||||
mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int position, long l) {
|
||||
new AlertDialog.Builder(taolun.this).setTitle("提示").setMessage("是否删除该评论")
|
||||
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
deleteData(position);
|
||||
}
|
||||
}).setNegativeButton("取消",null).show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mListView = findViewById(R.id.myListview);
|
||||
mBtn_insert = findViewById(R.id.insert);
|
||||
wenben = findViewById(R.id.xiepinglun);
|
||||
}
|
||||
|
||||
public void refreshListview() {
|
||||
Cursor mCursor = mDbWriter.query("pinglun", null, null, null, null, null, null);
|
||||
mSimpleCursorAdapter.changeCursor(mCursor);
|
||||
}
|
||||
public void insertData() {
|
||||
ContentValues mContentValues = new ContentValues();
|
||||
mContentValues.put("userid", name);
|
||||
mContentValues.put("pinglun", wenben.getText().toString().trim());
|
||||
mDbWriter.insert("pinglun", null, mContentValues);
|
||||
refreshListview();
|
||||
}
|
||||
public void deleteData(int positon) {
|
||||
Cursor mCursor = mSimpleCursorAdapter.getCursor();
|
||||
mCursor.moveToPosition(positon);
|
||||
int itemId = mCursor.getInt(mCursor.getColumnIndex("_id"));
|
||||
String username = mCursor.getString(mCursor.getColumnIndex("userid"));
|
||||
if(username.equals(name)){
|
||||
mDbWriter.delete("pinglun", "_id=?", new String[]{itemId + ""});
|
||||
refreshListview();
|
||||
}else if(username.length()==0){
|
||||
Toast.makeText(taolun.this,"您无权删除游客信息!!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else{
|
||||
new AlertDialog.Builder(taolun.this).setTitle("提示").setMessage("您无权限删除该信息!").show();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
public class welcome extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_welcome);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
startActivity(new Intent(welcome.this, MainActivity.class));
|
||||
finish();
|
||||
}
|
||||
},3000);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class wode extends AppCompatActivity {
|
||||
Button login;
|
||||
Button more;
|
||||
TextView username2;
|
||||
String name=null;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_wode);
|
||||
|
||||
initView();
|
||||
Intent intent=this.getIntent();
|
||||
name=intent.getStringExtra("username");
|
||||
|
||||
username2.setText(name);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent inten1=new Intent(wode.this,login.class);
|
||||
startActivity(inten1);
|
||||
}
|
||||
});
|
||||
more.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
new AlertDialog.Builder(wode.this).setMessage("更多功能,尽情期待").show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
login=findViewById(R.id.login);
|
||||
more=findViewById(R.id.more);
|
||||
username2=findViewById(R.id.username2);
|
||||
}
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Intent;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class yuyuexuanze extends AppCompatActivity{
|
||||
private Button button1,button2,button3,button4,backbutton;
|
||||
TextView text1,text2,text3,text4;
|
||||
private int year;
|
||||
private int month;
|
||||
private int day;
|
||||
private SQLiteDatabase mDbWriter;
|
||||
private DBHelper dbhelper;
|
||||
String name;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_yuyuexuanze);
|
||||
|
||||
dbhelper = new DBHelper(this);
|
||||
mDbWriter = dbhelper.getWritableDatabase();
|
||||
Intent intent=getIntent();
|
||||
name=intent.getStringExtra("username");
|
||||
initView();
|
||||
Calendar myCalendar = Calendar.getInstance(Locale.CHINA);
|
||||
Date myDate = new Date();
|
||||
myCalendar.setTime(myDate);
|
||||
|
||||
year = myCalendar.get(Calendar.YEAR);
|
||||
month = myCalendar.get(Calendar.MONTH);
|
||||
day = myCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
text1.setText("未预约");
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DatePickerDialog dpd=new DatePickerDialog(yuyuexuanze.this, new DatePickerDialog.OnDateSetListener() {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int myyear, int monthOfYear, int dayOfMonth) {
|
||||
text1.setText(myyear+"-"+(monthOfYear+1)+"-"+dayOfMonth);
|
||||
year=myyear;
|
||||
month=monthOfYear;
|
||||
day=dayOfMonth;
|
||||
String s="1";
|
||||
ContentValues mContentValues = new ContentValues();
|
||||
mContentValues.put("userid", name);
|
||||
mContentValues.put("pinzhong",s);
|
||||
mContentValues.put("data", text1.getText().toString().trim());
|
||||
mDbWriter.insert("yuyue", null, mContentValues);
|
||||
}
|
||||
},year,month,day);
|
||||
dpd.show();
|
||||
}
|
||||
});
|
||||
myCalendar.setTime(myDate);//为Calendar对象设置时间为当前日期
|
||||
|
||||
year = myCalendar.get(Calendar.YEAR);
|
||||
month = myCalendar.get(Calendar.MONTH);
|
||||
day = myCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
text2.setText("未预约");
|
||||
button2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DatePickerDialog dpd=new DatePickerDialog(yuyuexuanze.this, new DatePickerDialog.OnDateSetListener() {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int myyear, int monthOfYear, int dayOfMonth) {
|
||||
text2.setText(myyear+"-"+(monthOfYear+1)+"-"+dayOfMonth);
|
||||
year=myyear;
|
||||
month=monthOfYear;
|
||||
day=dayOfMonth;
|
||||
String s="2";
|
||||
ContentValues mContentValues = new ContentValues();
|
||||
mContentValues.put("userid", name);
|
||||
mContentValues.put("pinzhong",s);
|
||||
mContentValues.put("data", text2.getText().toString().trim());
|
||||
mDbWriter.insert("yuyue", null, mContentValues);
|
||||
}
|
||||
},year,month,day);
|
||||
dpd.show();
|
||||
}
|
||||
});
|
||||
myCalendar.setTime(myDate);//为Calendar对象设置时间为当前日期
|
||||
|
||||
year = myCalendar.get(Calendar.YEAR);
|
||||
month = myCalendar.get(Calendar.MONTH);
|
||||
day = myCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
text3.setText("未预约");
|
||||
button3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DatePickerDialog dpd=new DatePickerDialog(yuyuexuanze.this, new DatePickerDialog.OnDateSetListener() {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int myyear, int monthOfYear, int dayOfMonth) {
|
||||
text3.setText(myyear+"-"+(monthOfYear+1)+"-"+dayOfMonth);
|
||||
year=myyear;
|
||||
month=monthOfYear;
|
||||
day=dayOfMonth;
|
||||
String s="3";
|
||||
ContentValues mContentValues = new ContentValues();
|
||||
mContentValues.put("userid", name);
|
||||
mContentValues.put("pinzhong",s);
|
||||
mContentValues.put("data", text3.getText().toString().trim());
|
||||
mDbWriter.insert("yuyue", null, mContentValues);
|
||||
}
|
||||
},year,month,day);
|
||||
dpd.show();
|
||||
}
|
||||
});
|
||||
myCalendar.setTime(myDate);
|
||||
|
||||
year = myCalendar.get(Calendar.YEAR);
|
||||
month = myCalendar.get(Calendar.MONTH);
|
||||
day = myCalendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
text4.setText("未预约");
|
||||
button4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DatePickerDialog dpd=new DatePickerDialog(yuyuexuanze.this, new DatePickerDialog.OnDateSetListener() {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int myyear, int monthOfYear, int dayOfMonth) {
|
||||
text4.setText(myyear+"-"+(monthOfYear+1)+"-"+dayOfMonth);
|
||||
year=myyear;
|
||||
month=monthOfYear;
|
||||
day=dayOfMonth;
|
||||
String s="4";
|
||||
ContentValues mContentValues = new ContentValues();
|
||||
mContentValues.put("userid", name);
|
||||
mContentValues.put("pinzhong",s);
|
||||
mContentValues.put("data", text4.getText().toString().trim());
|
||||
mDbWriter.insert("yuyue", null, mContentValues);
|
||||
}
|
||||
},year,month,day);
|
||||
dpd.show();
|
||||
}
|
||||
});
|
||||
backbutton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent2=new Intent(yuyuexuanze.this,MainActivity.class);
|
||||
intent2.putExtra("username",name);
|
||||
startActivity(intent2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
button1 = findViewById(R.id.yuyuebutton1);
|
||||
button2 = findViewById(R.id.yuyuebutton2);
|
||||
button3 = findViewById(R.id.yuyuebutton3);
|
||||
button4 = findViewById(R.id.yuyuebutton4);
|
||||
backbutton=findViewById(R.id.fanhui);
|
||||
|
||||
text1 =findViewById(R.id.yuyuetext1);
|
||||
text2 =findViewById(R.id.yuyuetext2);
|
||||
text3 =findViewById(R.id.yuyuetext3);
|
||||
text4 =findViewById(R.id.yuyuetext4);
|
||||
}
|
||||
}
|
@ -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: 56 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 367 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 49 KiB |
@ -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="#3DDC84"
|
||||
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>
|
After Width: | Height: | Size: 603 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 92 KiB |
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".login">
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:orientation="vertical" android:layout_marginTop="50dp">
|
||||
<TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="欢迎光临实诚网上鞋店预约" android:textColor="#00868B" android:layout_marginTop="15dp" android:textSize="25dp"/>
|
||||
<EditText android:id="@+id/username" android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginLeft="50dp" android:layout_marginRight="50dp" android:layout_marginTop="15dp" android:singleLine="true" android:hint="请输入您的用户名" android:ems="10">
|
||||
<requestFocus/>
|
||||
</EditText>
|
||||
<EditText android:id="@+id/password" android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginLeft="50dp" android:layout_marginRight="50dp" android:layout_marginTop="15dp" android:singleLine="true" android:inputType="textPassword" android:hint="请输入您的密码" android:ems="10"/>
|
||||
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10sp">
|
||||
<Button android:id="@+id/login" android:layout_width="100dp" android:layout_height="wrap_content" android:text="登录" android:layout_marginRight="10sp" android:layout_marginLeft="50dp" android:textSize="20dp" android:layout_weight="1"/>
|
||||
<Button android:id="@+id/register" android:layout_width="100dp" android:layout_height="wrap_content" android:text="注册" android:layout_marginRight="10sp" android:layout_marginLeft="100dp" android:textSize="20dp" android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/td"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="登录即同意用户协议"
|
||||
android:layout_marginTop="200dp"
|
||||
android:gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".MainActivity"
|
||||
android:orientation="vertical">
|
||||
<ImageView android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="59dp"
|
||||
android:background="@color/purple_200"
|
||||
android:src="@drawable/title2"/>
|
||||
<TextView
|
||||
android:background="@drawable/shoess"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"/>
|
||||
<LinearLayout android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical">
|
||||
<TableLayout
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TableRow>
|
||||
<Button android:id="@+id/shouye" android:layout_width="102dp" android:background="#FFFFFF" android:drawableTop="@drawable/shouye" android:text="推荐"/>
|
||||
<Button android:id="@+id/yuyue" android:layout_width="102dp" android:drawableTop="@drawable/yuyue" android:background="#FFFFFF" android:text="预约"/>
|
||||
<Button android:id="@+id/taolun" android:layout_width="102dp" android:drawableTop="@drawable/taolun" android:background="#FFFFFF" android:text="讨论"/>
|
||||
<Button android:id="@+id/wode" android:layout_width="102dp" android:drawableTop="@drawable/wode" android:background="#FFFFFF" android:text="我的"/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="推荐鞋子"
|
||||
android:textSize="25dp"
|
||||
android:paddingLeft="30dp"
|
||||
android:paddingTop="10dp"/>
|
||||
<ListView
|
||||
android:id="@+id/tuijian"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</ListView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".register"
|
||||
android:orientation="vertical"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingLeft="20dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户注册"
|
||||
android:layout_gravity="center"
|
||||
android:paddingTop="40dp"
|
||||
android:textSize="30dp"/>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="170dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:textSize="20sp" android:textColor="#000000" android:text="用户名:"/>
|
||||
<EditText android:id="@+id/username1" android:layout_width="match_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_marginTop="10dp" android:hint="请输入用户名"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20sp" android:textColor="#000000" android:text="密 码:"/>
|
||||
<EditText android:id="@+id/password1" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入密码" android:singleLine="true" android:inputType="textPassword"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20sp" android:textColor="#000000" android:text="确认密码:"/>
|
||||
<EditText android:id="@+id/password2" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请再输入密码" android:singleLine="true" android:textColor="#000000" android:inputType="textPassword"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp">
|
||||
<Button android:id="@+id/confirm" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginBottom="10sp" android:layout_marginLeft="10sp" android:layout_marginRight="10sp" android:layout_weight="1" android:textSize="20dp" android:text="确认"/>
|
||||
<Button android:id="@+id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10sp" android:layout_marginLeft="10sp" android:layout_marginBottom="10sp" android:layout_weight="1" android:textSize="20dp" android:text="返回"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".shucai_activity"
|
||||
android:orientation="vertical">
|
||||
<TableRow android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:text="品质鞋子展示" android:textColor="#191970" android:textSize="30sp" android:paddingTop="5dp"/>
|
||||
</TableRow>
|
||||
<ListView android:id="@+id/yuyue" android:layout_width="fill_parent" android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".taolun"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
<ListView android:id="@+id/myListview" android:layout_width="match_parent" android:layout_height="wrap_content"> </ListView>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="20dp">
|
||||
<EditText android:id="@+id/xiepinglun" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="3" android:gravity="center"/>
|
||||
<Button android:id="@+id/insert" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="发表"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".welcome"
|
||||
android:background="@drawable/welcome2"/>
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".wode"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginLeft="80dp"
|
||||
android:layout_marginRight="80dp">
|
||||
<ImageView android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:src="@drawable/yuzhiboyou"/>
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20dp"
|
||||
android:textColor="#000000"
|
||||
android:text="用户名:"/>
|
||||
<TextView android:id="@+id/username2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20dp"/>
|
||||
</LinearLayout>
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20dp"
|
||||
android:text="个人简介:希望学业有成"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
<Button android:id="@+id/login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="登 录">
|
||||
</Button>
|
||||
<Button android:id="@+id/more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="更多功能">
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".yuyuexuanze"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="10dp">
|
||||
<ImageView android:layout_width="227dp" android:layout_height="159dp" android:src="@drawable/shoes1"/>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="25dp" android:id="@+id/yuyuetext1" android:layout_marginLeft="33dp" android:layout_marginTop="10dp"/>
|
||||
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="预约" android:layout_marginTop="28dp" android:layout_marginLeft="35dp" android:id="@+id/yuyuebutton1"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="5dp">
|
||||
<ImageView android:layout_width="227dp" android:layout_height="159dp" android:src="@drawable/shoes2"/>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/yuyuetext2" android:textSize="25dp" android:layout_marginLeft="35dp" android:layout_marginTop="10dp"/>
|
||||
<Button android:id="@+id/yuyuebutton2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="预约" android:layout_marginTop="28dp" android:layout_marginLeft="33dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="5dp">
|
||||
<ImageView android:layout_width="227dp" android:layout_height="159dp" android:src="@drawable/shoes3"/>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
|
||||
<TextView android:id="@+id/yuyuetext3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="25dp" android:layout_marginLeft="35dp" android:layout_marginTop="10dp"/>
|
||||
<Button android:id="@+id/yuyuebutton3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="28dp" android:layout_marginLeft="33dp" android:text="预约"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="5dp">
|
||||
<ImageView android:layout_width="227dp" android:layout_height="159dp" android:src="@drawable/shoes4"/>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/yuyuetext4" android:textSize="25dp" android:layout_marginLeft="35dp" android:layout_marginTop="10dp"/>
|
||||
<Button android:id="@+id/yuyuebutton4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="预约" android:layout_marginTop="28dp" android:layout_marginLeft="33dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<Button android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/fanhui" android:layout_marginRight="2dp" android:layout_marginTop="20dp" android:text="返回"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15dp"
|
||||
android:text="用户名:"/>
|
||||
|
||||
<TextView
|
||||
android:textSize="15dp"
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:textSize="22sp"
|
||||
android:id="@+id/pinglunlist"
|
||||
android:textColor="#000000"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"/>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tuijian_img"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="100dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.066"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.082" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tuijian_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textSize="20dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tuijian_img"
|
||||
app:layout_constraintStart_toEndOf="@+id/tuijian_img"
|
||||
app:layout_constraintTop_toTopOf="@+id/tuijian_img"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tuijian_text"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="60dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.965"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tuijian_title"
|
||||
app:layout_constraintVertical_bias="0.021" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
<ImageView android:id="@+id/img"
|
||||
android:layout_width="227dp"
|
||||
android:layout_height="159dp"
|
||||
android:layout_margin="5dp"/>
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView android:id="@+id/title_yuyue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="25sp"/>
|
||||
<TextView android:id="@+id/info_yuyue"
|
||||
android:paddingRight="25dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 7.6 KiB |
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.FruitAndVegetableAppointmentsApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">Fruit and Vegetable Appointments Application</string>
|
||||
</resources>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="LinerLayoutStyle">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
</style>
|
||||
<style name="TextViewStyle">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
</style>
|
||||
<style name="TextViewStyle1">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:paddingTop">20dp</item>
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
<item name="android:paddingRight">8dp</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.FruitAndVegetableAppointmentsApplication" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
@ -0,0 +1,17 @@
|
||||
package com.example.fruitandvegetableappointmentsapplication;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.2.2' apply false
|
||||
id 'com.android.library' version '7.2.2' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app"s APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.overridePathCheck=true
|
@ -0,0 +1,6 @@
|
||||
#Mon Dec 05 14:31:18 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
@ -0,0 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "Fruit and Vegetable Appointments Application"
|
||||
include ':app'
|