diff --git a/zuoyedaima/.gitignore b/zuoyedaima/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/zuoyedaima/.gitignore @@ -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 diff --git a/zuoyedaima/.idea/.gitignore b/zuoyedaima/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/zuoyedaima/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/zuoyedaima/.idea/.name b/zuoyedaima/.idea/.name new file mode 100644 index 0000000..ca1e750 --- /dev/null +++ b/zuoyedaima/.idea/.name @@ -0,0 +1 @@ +dazuoye \ No newline at end of file diff --git a/zuoyedaima/.idea/checkstyle-idea.xml b/zuoyedaima/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..760d829 --- /dev/null +++ b/zuoyedaima/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + 10.9.3 + JavaOnly + true + + + \ No newline at end of file diff --git a/zuoyedaima/.idea/compiler.xml b/zuoyedaima/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/zuoyedaima/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/.idea/dbnavigator.xml b/zuoyedaima/.idea/dbnavigator.xml new file mode 100644 index 0000000..d66c78d --- /dev/null +++ b/zuoyedaima/.idea/dbnavigator.xml @@ -0,0 +1,417 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/.idea/gradle.xml b/zuoyedaima/.idea/gradle.xml new file mode 100644 index 0000000..99fc0e9 --- /dev/null +++ b/zuoyedaima/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/.idea/misc.xml b/zuoyedaima/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/zuoyedaima/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/.idea/render.experimental.xml b/zuoyedaima/.idea/render.experimental.xml new file mode 100644 index 0000000..8ec256a --- /dev/null +++ b/zuoyedaima/.idea/render.experimental.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/.gitignore b/zuoyedaima/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/zuoyedaima/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/zuoyedaima/app/build.gradle b/zuoyedaima/app/build.gradle new file mode 100644 index 0000000..255887a --- /dev/null +++ b/zuoyedaima/app/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.dazuoye' + compileSdk 33 + + defaultConfig { + applicationId "com.example.dazuoye" + minSdk 33 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'de.hdodenhof:circleimageview:3.1.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'com.google.code.gson:gson:2.2.4' + implementation 'com.squareup.picasso:picasso:2.5.2' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + +} \ No newline at end of file diff --git a/zuoyedaima/app/proguard-rules.pro b/zuoyedaima/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/zuoyedaima/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/zuoyedaima/app/src/androidTest/java/com/example/dazuoye/ExampleInstrumentedTest.java b/zuoyedaima/app/src/androidTest/java/com/example/dazuoye/ExampleInstrumentedTest.java new file mode 100644 index 0000000..26603a1 --- /dev/null +++ b/zuoyedaima/app/src/androidTest/java/com/example/dazuoye/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.dazuoye; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.dazuoye", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/AndroidManifest.xml b/zuoyedaima/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5656579 --- /dev/null +++ b/zuoyedaima/app/src/main/AndroidManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/assets/xzcontent/xzcontent.json b/zuoyedaima/app/src/main/assets/xzcontent/xzcontent.json new file mode 100644 index 0000000..1bb60de --- /dev/null +++ b/zuoyedaima/app/src/main/assets/xzcontent/xzcontent.json @@ -0,0 +1,145 @@ +{"starinfo":[ + { + "logoname": "dapei", + "name": "搭 配", + "date": "这里的每件新衣都给了你十个出门的理由/", + "td": "今天想变身为可爱女孩/", + "gw": "素雅绵柔,穿出你的风格/", + "yy": "舒适有质感,气质和品味/", + "tz": "对“温柔的力量”最好的诠释/", + "zg": "穿对它的时候,它也在塑造你/", + "ys": "旧元素也能碰撞出新花样/", + "zb": "暖色调的搭配让人们骤然舒适起来/", + "hm": "新潮的黑白配,有很强的贵族气息/", + "js": "内短外长的组合极具层次感/", + "info": "你的身材配上这t套衣服在合适不过了/" + }, + { + "logoname": "qunzi", + "name": "裙 子", + "date": "没有遇见你,小裙子都觉得怀才不遇", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" + }, + { + "logoname": "shangyi", + "name": "上 衣", + "date": "穿好看的皮囊,见有趣的灵魂", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "kuzi", + "name": "裤 子", + "date": "你的美丽已经不允许你再穿旧衣服了", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "waitao", + "name": "外 套", + "date": "换季添衣啦!衣柜里的衣服没有四季,只有最新与过期", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "peishi", + "name": "配 饰", + "date": "你只要负责漂亮,剩下的让我们负责吧", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "gufeng", + "name": "古 风", + "date": "衣服本身没灵魂,穿在你身上才充满感情", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "lifu", + "name": "礼 服", + "date": "你的美貌已余额不足,请进店充值", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "gongzhuqun", + "name": "公 主 裙", + "date": "我以夏天的名义穿上短裙,也替月亮夺走你的心事", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" }, + { + "logoname": "zhiyezhuang", + "name": "职 业 装", + "date": "新时代女性力量就是打破枷锁,在经典中糅合活力", + "td": "优雅蕾丝连衣裙/", + "gw": "奶油米色调太温柔啦/", + "yy": "蕾丝刺绣也超精致确满满浪漫气息/", + "tz": "裙子独特设计不失优雅/", + "zg": "当你穿上这件裙子的时候,感觉春天就要来临啦/", + "ys": "将天真俏皮搬到衣服上/", + "zb": "此面料花色丰富,穿起来舒适又有质感,能充分提现穿着者的气质和品味/", + "hm": "体会到夏日带来的清爽与浪漫", + "js": "将你的身材衬托得淋漓尽致/", + "info": "时尚唯美的外衣,尊贵优雅的典范/" } +] +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/dapei.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/dapei.png new file mode 100644 index 0000000..6e9a0b5 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/dapei.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/gongzhuqun.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/gongzhuqun.png new file mode 100644 index 0000000..5501f84 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/gongzhuqun.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/gufeng.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/gufeng.png new file mode 100644 index 0000000..9c92c19 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/gufeng.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/kuzi.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/kuzi.png new file mode 100644 index 0000000..775f64d Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/kuzi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/lifu.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/lifu.png new file mode 100644 index 0000000..541c337 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/lifu.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/peishi.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/peishi.png new file mode 100644 index 0000000..0a9008f Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/peishi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/qunzi.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/qunzi.png new file mode 100644 index 0000000..ad14a9f Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/qunzi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/shangyi.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/shangyi.png new file mode 100644 index 0000000..e0bd973 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/shangyi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/waitao.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/waitao.png new file mode 100644 index 0000000..18e94ff Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/waitao.png differ diff --git a/zuoyedaima/app/src/main/assets/xzcontentlogo/zhiyezhuang.png b/zuoyedaima/app/src/main/assets/xzcontentlogo/zhiyezhuang.png new file mode 100644 index 0000000..c89c858 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzcontentlogo/zhiyezhuang.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/dapei.png b/zuoyedaima/app/src/main/assets/xzlogo/dapei.png new file mode 100644 index 0000000..6e9a0b5 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/dapei.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/gongzhuqun.png b/zuoyedaima/app/src/main/assets/xzlogo/gongzhuqun.png new file mode 100644 index 0000000..5501f84 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/gongzhuqun.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/gufeng.png b/zuoyedaima/app/src/main/assets/xzlogo/gufeng.png new file mode 100644 index 0000000..9c92c19 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/gufeng.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/kuzi.png b/zuoyedaima/app/src/main/assets/xzlogo/kuzi.png new file mode 100644 index 0000000..775f64d Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/kuzi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/lifu.png b/zuoyedaima/app/src/main/assets/xzlogo/lifu.png new file mode 100644 index 0000000..541c337 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/lifu.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/peishi.png b/zuoyedaima/app/src/main/assets/xzlogo/peishi.png new file mode 100644 index 0000000..0a9008f Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/peishi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/qunzi.png b/zuoyedaima/app/src/main/assets/xzlogo/qunzi.png new file mode 100644 index 0000000..ad14a9f Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/qunzi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/shangyi.png b/zuoyedaima/app/src/main/assets/xzlogo/shangyi.png new file mode 100644 index 0000000..e0bd973 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/shangyi.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/waitao.png b/zuoyedaima/app/src/main/assets/xzlogo/waitao.png new file mode 100644 index 0000000..18e94ff Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/waitao.png differ diff --git a/zuoyedaima/app/src/main/assets/xzlogo/zhiyezhuang.png b/zuoyedaima/app/src/main/assets/xzlogo/zhiyezhuang.png new file mode 100644 index 0000000..c89c858 Binary files /dev/null and b/zuoyedaima/app/src/main/assets/xzlogo/zhiyezhuang.png differ diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/MainActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/MainActivity.java new file mode 100644 index 0000000..3b21c36 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/MainActivity.java @@ -0,0 +1,168 @@ +package com.example.dazuoye; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import android.annotation.SuppressLint; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RadioGroup; + +import com.example.dazuoye.activity.RegisterActivity; +import com.example.dazuoye.activity.UserActivity; +import com.example.dazuoye.bean.StarInfobean; +import com.example.dazuoye.luck.luckFragment; +import com.example.dazuoye.me.meFragment; + +import com.example.dazuoye.partner.partnerFragment; +import com.example.dazuoye.star.DetailActivity; +import com.example.dazuoye.star.ImageDetailActivity; +import com.example.dazuoye.star.RvStaggerActivity; +import com.example.dazuoye.star.starFragment; +import com.example.dazuoye.utils.AssetsUtils; +import com.google.gson.Gson; + + +public class MainActivity extends AppCompatActivity implements RadioGroup.OnCheckedChangeListener,View.OnClickListener{ + RadioGroup mainRg; +// 声明四个按钮对应的fragment对象 + Fragment starFrag,luckFrag,partnerFrag,meFrag; + + private Button registerButton, loginButton,regButton,user_searchProduct; + private EditText usernameText,paswdEdit,surePasswordEdit,phoneEdit,usernameEdit,passwordEdit; + private FragmentManager m; + private FragmentManager manager; + private FragmentTransaction transaction; + + + @SuppressLint("MissingInflatedId") + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + mainRg=findViewById(R.id.main_rg); + + + View decorView = getWindow().getDecorView(); + int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; + decorView.setSystemUiVisibility(uiOptions); + //设计监听点击了哪个单选按钮 + mainRg.setOnCheckedChangeListener(this); +// 加载星座相关数据 /assets/xzcontent/xzcontent.json + StarInfobean infobean = loadData(); + Bundle bundle = new Bundle(); + bundle.putSerializable("info",infobean); +// 创建碎片对象 + starFrag = new starFragment(); + starFrag.setArguments(bundle); + luckFrag = new luckFragment(); + luckFrag.setArguments(bundle); + partnerFrag = new partnerFragment(); + partnerFrag.setArguments(bundle); + meFrag = new meFragment(); + meFrag.setArguments(bundle); + //将四个fragment动态加载,一起加载到布局当中 + addFragmentpage(); + } + + private StarInfobean loadData() { + String json = AssetsUtils.getJsonFromAssets(this, "xzcontent/xzcontent.json"); + Gson gson = new Gson(); + StarInfobean infoBean = gson.fromJson(json, StarInfobean.class); + AssetsUtils.saveBitmapFromAssets(this,infoBean); + return infoBean; + } + + + //将主页当中有用的碎片显示,没用的隐藏 + private void addFragmentpage() { + manager = getSupportFragmentManager(); + FragmentTransaction transaction1 = manager.beginTransaction(); + //将四个fragment统一的添加到布局当中 + transaction1.add(R.id.main_layout_center,starFrag); + transaction1.add(R.id.main_layout_center,partnerFrag); + transaction1.add(R.id.main_layout_center,luckFrag); + transaction1.add(R.id.main_layout_center,meFrag); + //隐藏后面三个 + transaction1.hide(partnerFrag); + transaction1.hide(luckFrag); + transaction1.hide(meFrag); + transaction1.commit(); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.user_searchProduct: + {Intent intent=new Intent(this, RegisterActivity.class); + startActivity(intent);} + break; + case R.id.register: + {Intent intent = new Intent(MainActivity.this, UserActivity.class); + startActivity(intent);} + break; + case R.id.login: + {Intent intent = new Intent(this, RegisterActivity.class); + startActivity(intent);} + break; + } + } + + //界面组件初始化 + private void init() { + usernameText = findViewById(R.id.username); + paswdEdit = findViewById(R.id.password); + loginButton = findViewById(R.id.login); + loginButton.setOnClickListener((View.OnClickListener) this); + registerButton = findViewById(R.id.register); + registerButton.setOnClickListener((View.OnClickListener) this); + usernameEdit = findViewById(R.id.reg_username); + passwordEdit = findViewById(R.id.reg_password); + phoneEdit = findViewById(R.id.telephone); + surePasswordEdit = findViewById(R.id.reg_sure_password); + regButton = findViewById(R.id.reg_register); + View sexGroup = findViewById(R.id.sex); + user_searchProduct=findViewById(R.id.user_searchProduct); + user_searchProduct.setOnClickListener(this); + + } + + @Override + public void onCheckedChanged(RadioGroup group, int checkedId) { + FragmentTransaction transaction1 = manager.beginTransaction(); + switch (checkedId){ + case R.id.main_rb_star: + transaction1.hide(partnerFrag); + transaction1.hide(luckFrag); + transaction1.hide(meFrag); + transaction1.show(starFrag); + break; + case R.id.main_rb_partner: + transaction1.hide(starFrag); + transaction1.hide(luckFrag); + transaction1.hide(meFrag); + transaction1.show(partnerFrag); + break; + case R.id.main_rb_luck: + transaction1.hide(partnerFrag); + transaction1.hide(starFrag); + transaction1.hide(meFrag); + transaction1.show(luckFrag); + break; + case R.id.main_rb_me: + transaction1.hide(partnerFrag); + transaction1.hide(luckFrag); + transaction1.hide(starFrag); + transaction1.show(meFrag); + break; + } + transaction1.commit(); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/RegisterActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/RegisterActivity.java new file mode 100644 index 0000000..86c1714 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/RegisterActivity.java @@ -0,0 +1,113 @@ +package com.example.dazuoye.activity; + +import android.content.Intent; + +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RadioGroup; +import android.widget.Toast; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import com.example.dazuoye.MainActivity; +import com.example.dazuoye.R; + + +public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, RadioGroup.OnCheckedChangeListener { + private EditText usernameEdit, passwordEdit, surePasswordEdit,phoneEdit; + private Button regButton; + private RadioGroup sexGroup; + private String sexStr = "男"; + + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.user_register); + init(); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { + + case R.id.reg_register: + {validateRegister(v); + Intent intent = new Intent(this, UserActivity.class); + startActivity(intent); } + break; + + } + } + /** + * 界面组件初始化 + */ + private void init() { + usernameEdit = findViewById(R.id.reg_username); + passwordEdit = findViewById(R.id.reg_password); + phoneEdit = findViewById(R.id.telephone); + surePasswordEdit = findViewById(R.id.reg_sure_password); + regButton = findViewById(R.id.reg_register); + regButton.setOnClickListener(this); + sexGroup = findViewById(R.id.sex); + sexGroup.setOnCheckedChangeListener(this); + + } + +// @Override +// public void onClick(View v) { +// switch (v.getId()) { +// case R.id.reg_register: +// //注册验证方法 +// validateRegister(v); +// break; +// } +// } + + + /** + * 注册验证 + */ + public void validateRegister(View view) { + Intent intent = new Intent(RegisterActivity.this, UserActivity.class); + String username = usernameEdit.getText().toString(); + String phone = phoneEdit.getText().toString(); + String password = passwordEdit.getText().toString(); + String surePassword = surePasswordEdit.getText().toString(); + // 打印用户输入的信息 + Log.d("RegisterActivity", "username: " + username + ", phone: " + phone + ", password: " + password + ", surePassword: " + surePassword); + //判断两次密码是否输入一致 + if (password.equals(surePassword)) { + //这里也可以再进行其它的验证,如是否符合要求等,符合就进行插入数据库操作 + if (!username.equals("") || !password.equals("") || !phone.equals("")){ + Bundle bundle = new Bundle(); + bundle.putString("username", username); + bundle.putString("phone", phone); + bundle.putString("password", password); + bundle.putString("sex", sexStr); + // 打印 Bundle 中的信息 + Log.d("RegisterActivity", "bundle: " + bundle.toString()); + intent.putExtras(bundle); + // 打印启动页面的信息 + Log.d("RegisterActivity", "start intent: " + intent.toString()); + startActivity(intent);} + else { + Toast.makeText(RegisterActivity.this, "账号、密码或电话未填写", Toast.LENGTH_SHORT).show(); + } + } + else{ + Toast.makeText(RegisterActivity.this, "两次密码输入不一致", Toast.LENGTH_SHORT).show(); + } + } + + @Override + public void onCheckedChanged (RadioGroup group,int checkedId){ + //根据用户选择来改变sex的值 + sexStr = checkedId == R.id.reg_man ? "男" : "女"; + } + } + diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/UserActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/UserActivity.java new file mode 100644 index 0000000..8dd7f7d --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/activity/UserActivity.java @@ -0,0 +1,89 @@ +package com.example.dazuoye.activity; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import com.example.dazuoye.MainActivity; +import com.example.dazuoye.R; +import com.example.dazuoye.me.meFragment; + + +public class UserActivity extends FragmentActivity { + private ImageView userIconImage; + private TextView usernameText, userSexText, userphoneText; + private LinearLayout usernameLine, userSexline, userphoneline, userPayLine, userSettingLine, userGeneralLine; + private FragmentManager fragmentManager; + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.fragment_me); +// FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); + Fragment fragment = new meFragment(); + fragmentManager = getSupportFragmentManager(); + FragmentTransaction transaction = null; + transaction.replace(R.id.fragment_container, fragment); + transaction.commit(); + Log.d("RegisterActivity", "Enter UserActivity"); + + } + + public FragmentManager getSupportFragmentManager() { + return null; + } + + public void onClick(View view) { + Intent intent=new Intent(); + switch (view.getId()) { + case R.id.user_searchProduct: + intent.setClass(UserActivity.this, RegisterActivity.class); + break; + } + startActivity(intent); + } + /** + * 组件初始化 + */ + private void init() { + userIconImage = findViewById(R.id.user_icon); + usernameText = findViewById(R.id.user_username); + userSexText = findViewById(R.id.user_sex); + userphoneText = findViewById(R.id.user_phone); + usernameLine = findViewById(R.id.user_username_line); + userSexline = findViewById(R.id.user_sex_line); + userphoneline = findViewById(R.id.user_phone_line); + userPayLine = findViewById(R.id.user_pay); + userSettingLine = findViewById(R.id.user_setting); + userGeneralLine = findViewById(R.id.user_general); + setData(); + } + + /** + * 组件赋值 + */ + private void setData() { + Intent intent = UserActivity.this.getIntent(); + Bundle bundle = intent.getExtras(); + usernameText.setText(String.format("用户名:%s", bundle.getString("username"))); + userphoneText.setText(String.format("电话号码:%s", bundle.getString("phone"))); + userSexText.setText(String.format("性别:%s", bundle.getString("sex"))); + + } + + + +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodBean.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodBean.java new file mode 100644 index 0000000..22bf1cc --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodBean.java @@ -0,0 +1,52 @@ +package com.example.dazuoye.bean; + +import java.io.Serializable; + +public class FoodBean implements Serializable{ + private String title; + private String notmatch; + private String desc; + private int picId; + + public FoodBean(String title, String notmatch, String desc, int picId) { + this.title = title; + this.notmatch = notmatch; + this.desc = desc; + this.picId = picId; + } + + public FoodBean() { + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getNotmatch() { + return notmatch; + } + + public void setNotmatch(String notmatch) { + this.notmatch = notmatch; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } + + public int getPicId() { + return picId; + } + + public void setPicId(int picId) { + this.picId = picId; + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodUtils.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodUtils.java new file mode 100644 index 0000000..ad8ba6e --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/FoodUtils.java @@ -0,0 +1,24 @@ +package com.example.dazuoye.bean; + + + +import com.example.dazuoye.R; + +import java.util.ArrayList; +import java.util.List; + +public class FoodUtils { + private static final String[] qunzi = { "裙子1", "裙子2","上衣1"," 上衣2", "外套1","外套2"}; + private static final String[] shangyi = { "裙子1", "裙子2","上衣1"," 上衣2","外套1","外套2" }; + private static final int[] resId = { R.drawable.qunzi1,R.drawable.qunzi2,R.drawable.shangyi1,R.drawable.shangyi2,R.drawable.waitao1,R.drawable.waitao2}; + private static final String [] shangpinjieshao={"商品介绍1","商品介绍2","商品介绍3","商品介绍4","商品介绍5","商品介绍6"}; + + public static List getAllFoodList(){ + List list = new ArrayList<>(); + for (int i = 0; i < qunzi.length; i++) { + FoodBean bean = new FoodBean(qunzi[i],shangyi[i],shangpinjieshao[i],resId[i]); + list.add(bean); + } + return list; + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/StarInfobean.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/StarInfobean.java new file mode 100644 index 0000000..3bc51f7 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/bean/StarInfobean.java @@ -0,0 +1,154 @@ +package com.example.dazuoye.bean; + +import java.io.Serializable; +import java.util.List; + +public class StarInfobean implements Serializable { + + + private List starinfo; + + public List getStarinfo() { + return starinfo; + } + + public void setStarinfo(List starinfo) { + this.starinfo = starinfo; + } + + public static class StarinfoBean implements Serializable{ + /** + * logoname : dapei + * name : 搭配 + * date : 3月21日-4月19日 + * td : 热情活力 + * gw : 第一宫 + * yy : 阳性 + * tz : 控制 + * zg : 火星 + * ys : 红色 + * zb : 红宝石 + * hm : 5 + * js : 铁 + * info : 白羊座有一种让人看见就觉得开心的感觉,因为总是看起来都是那么地热情、阳光、乐观、坚强,对朋友也慷概大方,性格直来直往,就是有点小脾气。白羊男有大男人主义的性格,而白羊女就是女汉子的形象。 + */ + + private String logoname; + private String name; + private String date; + private String td; + private String gw; + private String yy; + private String tz; + private String zg; + private String ys; + private String zb; + private String hm; + private String js; + private String info; + + public String getLogoname() { + return logoname; + } + + public void setLogoname(String logoname) { + this.logoname = logoname; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + public String getTd() { + return td; + } + + public void setTd(String td) { + this.td = td; + } + + public String getGw() { + return gw; + } + + public void setGw(String gw) { + this.gw = gw; + } + + public String getYy() { + return yy; + } + + public void setYy(String yy) { + this.yy = yy; + } + + public String getTz() { + return tz; + } + + public void setTz(String tz) { + this.tz = tz; + } + + public String getZg() { + return zg; + } + + public void setZg(String zg) { + this.zg = zg; + } + + public String getYs() { + return ys; + } + + public void setYs(String ys) { + this.ys = ys; + } + + public String getZb() { + return zb; + } + + public void setZb(String zb) { + this.zb = zb; + } + + public String getHm() { + return hm; + } + + public void setHm(String hm) { + this.hm = hm; + } + + public String getJs() { + return js; + } + + public void setJs(String js) { + this.js = js; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodDescActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodDescActivity.java new file mode 100644 index 0000000..3ad6f0b --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodDescActivity.java @@ -0,0 +1,48 @@ +package com.example.dazuoye.food_grid; + +import android.content.Intent; + +import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.FoodBean; + +public class FoodDescActivity extends AppCompatActivity { + TextView titleTv1,titleTv2,descTv,notTv; + ImageView backIv,bigPicIv; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.fragment_star); + initView(); +// 接受上一级页面传来的数据 + Intent intent = getIntent(); + FoodBean foodBean = (FoodBean) intent.getSerializableExtra("food"); +// 设置显示控件 + titleTv1.setText(foodBean.getTitle()); + titleTv2.setText(foodBean.getTitle()); + descTv.setText(foodBean.getDesc()); + notTv.setText(foodBean.getNotmatch()); + bigPicIv.setImageResource(foodBean.getPicId()); + } + + private void initView() { + titleTv1 = findViewById(R.id.fooddesc_tv_title1); + titleTv2 = findViewById(R.id.fooddesc_tv_title2); + descTv = findViewById(R.id.fooddesc_tv_desc); + notTv = findViewById(R.id.fooddesc_tv_not); + backIv = findViewById(R.id.fooddesc_iv_back); + bigPicIv = findViewById(R.id.fooddesc_iv_bigpic); + backIv.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); //销毁当前的activity + } + }); + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridActivity.java new file mode 100644 index 0000000..2770b11 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridActivity.java @@ -0,0 +1,48 @@ +package com.example.dazuoye.food_grid; + +import android.content.Intent; + +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.GridView; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.FoodBean; +import com.example.dazuoye.bean.FoodUtils; + +import java.util.List; + +public class FoodGridActivity extends AppCompatActivity { + GridView gv; + ListmDatas; + private FoodGridAdapter adapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.fragment_star); +// gv = findViewById(R.id.food_grid_gv); +// 数据源 + mDatas = FoodUtils.getAllFoodList(); +// 创建适配器对象 + adapter = new FoodGridAdapter(this, mDatas); +// 设置适配器 + gv.setAdapter(adapter); + setListener(); + } + + private void setListener() { + gv.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + FoodBean foodBean = mDatas.get(position); + Intent intent = new Intent(FoodGridActivity.this, FoodDescActivity.class); + intent.putExtra("food",foodBean); + startActivity(intent); + } + }); + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridAdapter.java new file mode 100644 index 0000000..b5dcbc4 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/food_grid/FoodGridAdapter.java @@ -0,0 +1,66 @@ +package com.example.dazuoye.food_grid; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.FoodBean; + +import java.util.List; + +public class FoodGridAdapter extends BaseAdapter{ + Context context; + ListmDatas; + + public FoodGridAdapter(Context context, List mDatas) { + this.context = context; + this.mDatas = mDatas; + } + + @Override + public int getCount() { + return mDatas.size(); + } + + @Override + public Object getItem(int position) { + return mDatas.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { +// 1.声明ViewHolder + ViewHolder holder = null; + if (convertView == null) { //2.判断是否有复用的view,如果没有就创建 + convertView = LayoutInflater.from(context).inflate(R.layout.item_foodgrid,null); + holder = new ViewHolder(convertView); + convertView.setTag(holder); + }else { + holder = (ViewHolder) convertView.getTag(); + } +// 获取指定位置的数据 + FoodBean foodBean = mDatas.get(position); + holder.iv.setImageResource(foodBean.getPicId()); + holder.tv.setText(foodBean.getTitle()); + return convertView; + } + + class ViewHolder{ + ImageView iv; + TextView tv; + public ViewHolder(View view){ + iv = view.findViewById(R.id.item_grid_iv); + tv = view.findViewById(R.id.item_grid_tv); + } + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/luck/luckFragment.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/luck/luckFragment.java new file mode 100644 index 0000000..d4897ff --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/luck/luckFragment.java @@ -0,0 +1,66 @@ +package com.example.dazuoye.luck; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.example.dazuoye.R; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link luckFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class luckFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + +// public luckFragment() { +// // Required empty public constructor +// } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment luckFragment. + */ + // TODO: Rename and change types and number of parameters + public static luckFragment newInstance(String param1, String param2) { + luckFragment fragment = new luckFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_luck, container, false); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/me/meFragment.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/me/meFragment.java new file mode 100644 index 0000000..c0ad4db --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/me/meFragment.java @@ -0,0 +1,70 @@ +package com.example.dazuoye.me; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.example.dazuoye.R; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link meFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class meFragment extends Fragment { + private FragmentManager fragmentManager; + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + +// public meFragment() { +// // Required empty public constructor +// } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment meFragment. + */ + // TODO: Rename and change types and number of parameters + public static meFragment newInstance(String param1, String param2) { + meFragment fragment = new meFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + FragmentManager fragmentManager = getChildFragmentManager(); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + + fragmentManager = getChildFragmentManager(); + return inflater.inflate(R.layout.fragment_me, container, false); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListActivity.java new file mode 100644 index 0000000..6271ba7 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListActivity.java @@ -0,0 +1,103 @@ +package com.example.dazuoye.partner; + +import android.content.Intent; + +import android.os.Bundle; +import android.text.TextUtils; +import android.view.View; +import android.widget.AdapterView; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.Toast; + +import androidx.appcompat.app.AppCompatActivity; + + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.FoodBean; +import com.example.dazuoye.bean.FoodUtils; +import com.example.dazuoye.food_grid.FoodDescActivity; + +import java.security.MessageDigest; +import java.util.ArrayList; +import java.util.List; + +public class InfoListActivity extends AppCompatActivity implements View.OnClickListener{ + EditText searchEt; + ImageView searchIv,flushIv; + ListView showLv; + // ListView内部数据源 + ListmDatas; + ListallFoodList; + private InfoListAdapter adapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.fragment_partner); +// 查找控件 + initView(); +// 2.找到ListView对应的数据源 + mDatas = new ArrayList<>(); + allFoodList = FoodUtils.getAllFoodList(); + mDatas.addAll(allFoodList); +// 3.创建适配器 BaseAdapter的子类 + adapter = new InfoListAdapter(this, mDatas); + showLv.setAdapter(adapter); //4.设置适配器 +// 设置单向点击监听功能 + setListener(); + } + + private void setListener() { + showLv.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + FoodBean foodBean = mDatas.get(position); + Intent intent = new Intent(InfoListActivity.this, FoodDescActivity.class); + intent.putExtra("food",foodBean); + startActivity(intent); + } + }); + } + + private void initView() { + searchEt = findViewById(R.id.starfrag_layout); + searchIv = findViewById(R.id.starfrag_gv); + flushIv = findViewById(R.id.starfrag_vp); + showLv = findViewById(R.id.starfrag_grid); + searchIv.setOnClickListener(this); //添加点击事件的监听器 + flushIv.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + switch (v.getId()) { +// case R.id.info_iv_flush: //刷新点击 +// searchEt.setText(""); +// mDatas.clear(); +// mDatas.addAll(allFoodList); +// adapter.notifyDataSetChanged(); +// break; + case R.id.searchview: //搜索点击 +// 1.获取输入内容,判断不为空 + String msg = searchEt.getText().toString().trim(); //获取输入信息 + if (TextUtils.isEmpty(msg)) { + Toast.makeText(this,"输入内容不能为空!",Toast.LENGTH_SHORT).show(); + return; + } +// 判断所有食物列表的标题是否包含输入内容,如果包含,就添加到小集合中 + Listlist = new ArrayList<>(); + for (int i = 0; i < allFoodList.size(); i++) { + String title = allFoodList.get(i).getTitle(); + if (title.contains(msg)) { + list.add(allFoodList.get(i)); + } + } + mDatas.clear(); // 清空ListView的适配器数据源内容 + mDatas.addAll(list); // 添加新的数据到数据源中 + adapter.notifyDataSetChanged(); // 提示适配器更新 + break; + } + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListAdapter.java new file mode 100644 index 0000000..bf0a371 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/InfoListAdapter.java @@ -0,0 +1,67 @@ +package com.example.dazuoye.partner; +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.FoodBean; + +import java.util.List; + +public class InfoListAdapter extends BaseAdapter{ + Context context; + ListmDatas; + + public InfoListAdapter(Context context, List mDatas) { + this.context = context; + this.mDatas = mDatas; + } + // 决定了ListView列表展示的行数 + @Override + public int getCount() { + return mDatas.size(); + } + //返回指定位置对应的数据 + @Override + public Object getItem(int position) { + return mDatas.get(position); + } + // 返回指定位置所对应的id + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder holder = null; + if (convertView == null) { + convertView = LayoutInflater.from(context).inflate(R.layout.rv_vertical_item,null); //将布局转换成view对象的方法 + holder=new ViewHolder(convertView); + convertView.setTag(holder); + }else { + holder = (ViewHolder) convertView.getTag(); + } +// 加载控件显示的内容 +// 获取集合指定位置的数据 + FoodBean foodBean = mDatas.get(position); + holder.titleTv.setText(foodBean.getTitle()); + holder.notTv.setText("不可匹配:"+foodBean.getNotmatch()); + holder.iv.setImageResource(foodBean.getPicId()); + return convertView; + } + + class ViewHolder{ + ImageView iv; + TextView titleTv,notTv; + public ViewHolder(View view){ + iv = view.findViewById(R.id.item_info_iv); + titleTv = view.findViewById(R.id.item_info_tv_title); + notTv = view.findViewById(R.id.item_info_tv_notmatch); + } + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/MyGoods.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/MyGoods.java new file mode 100644 index 0000000..bd8445f --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/MyGoods.java @@ -0,0 +1,33 @@ +package com.example.dazuoye.partner; +//封装商品实体类 +public class MyGoods { + private String name;//名称 + private String price;//价格 + private Integer icon;//图片 + private String introduce;//介绍 + public MyGoods(){ + + } + public MyGoods(String name,String price,Integer icon,String introduce){ + this.name=name; + this.price=price; + this.icon=icon; + this.introduce=introduce; + } + public String getName(){ + return name; + } + + public String getPrice(){ + return price; + } + + public Integer getIcon(){ + return icon; + } + + public String getIntroduce(){ + return introduce; + } +} + diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/partnerFragment.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/partnerFragment.java new file mode 100644 index 0000000..5e8759d --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/partner/partnerFragment.java @@ -0,0 +1,66 @@ +package com.example.dazuoye.partner; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.example.dazuoye.R; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link partnerFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class partnerFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + +// public partnerFragment() { +// // Required empty public constructor +// } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment partnerFragment. + */ + // TODO: Rename and change types and number of parameters + public static partnerFragment newInstance(String param1, String param2) { + partnerFragment fragment = new partnerFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_partner, container, false); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/AnalysisBaseAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/AnalysisBaseAdapter.java new file mode 100644 index 0000000..99369df --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/AnalysisBaseAdapter.java @@ -0,0 +1,62 @@ +package com.example.dazuoye.star; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +import com.example.dazuoye.R; + +import java.util.List; + +public class AnalysisBaseAdapter extends BaseAdapter { + Context context; + List mDatas; + + public AnalysisBaseAdapter(Context context, List mDatas) { + this.context = context; + this.mDatas = mDatas; + } + + @Override + public int getCount() { + return mDatas.size(); + } + + @Override + public Object getItem(int position) { + return mDatas.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder holder = null; + if (convertView == null) { + convertView = LayoutInflater.from(context).inflate(R.layout.item_star_analysis,null); + holder = new ViewHolder(convertView); + convertView.setTag(holder); + }else { + holder = (ViewHolder) convertView.getTag(); + } + StarAnalysisBean bean = mDatas.get(position); + holder.titleTv.setText(bean.getTitle()); + holder.contentTv.setText(bean.getContent()); + holder.contentTv.setBackgroundResource(bean.getColor()); + return convertView; + } + + class ViewHolder{ + TextView titleTv,contentTv; + public ViewHolder(View view){ + titleTv = view.findViewById(R.id.itemstar_tv_title); + contentTv = view.findViewById(R.id.itemstar_tv_content); + } + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/DetailActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/DetailActivity.java new file mode 100644 index 0000000..a0a3d2e --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/DetailActivity.java @@ -0,0 +1,44 @@ +package com.example.dazuoye.star; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.dazuoye.R; + +public class DetailActivity extends AppCompatActivity { + + private ImageView detailImage; + private TextView detailText; + private Button backButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.detail_layout); + + detailImage = findViewById(R.id.detail_image_view); + detailText = findViewById(R.id.detail_text_view); + backButton = findViewById(R.id.back_button); + // 获取点击图片传递进来的intent,从中取出图片资源ID和文字信息 + Intent intent = getIntent(); + int imageResId = intent.getIntExtra("image", R.drawable.qunzi1); + String text = intent.getStringExtra("text"); + + // 设置详情页面的图片和文字信息 + detailImage.setImageResource(imageResId); + detailText.setText(text); + backButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); // 关闭当前Activity,回到上一个界面 + } + }); + } + +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageAdapter.java new file mode 100644 index 0000000..b68ae16 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageAdapter.java @@ -0,0 +1,76 @@ +package com.example.dazuoye.star; + +import android.content.Context; +import android.content.Intent; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.GridView; +import android.widget.ImageView; +import android.widget.TextView; + +import com.example.dazuoye.R; + +public class ImageAdapter extends BaseAdapter { + + private static final int[] IMAGES = {R.drawable.qunzi1, R.drawable.qunzi2, R.drawable.shangyi1, + R.drawable.shangyi2, R.drawable.waitao1, R.drawable.waitao2}; + private static final String[] TITLES = {"裙子1 ¥188","裙子2 ¥168","上衣1 ¥88","上衣2 ¥78", + "外套1 ¥198","外套2 ¥198"}; + + private Context mContext; + + public ImageAdapter(Context context) { + mContext = context; + } + + @Override + public int getCount() { + return IMAGES.length; + } + + @Override + public Object getItem(int position) { + return IMAGES[position]; + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(final int position, View convertView, ViewGroup parent) { + View view; + + if (convertView == null) { + // 创建一个新的视图 + view = LayoutInflater.from(mContext).inflate(R.layout.activity_image_detail, parent, false); + } else { + view = convertView; + } + + ImageView imageView = view.findViewById(R.id.image_view); + TextView textView = view.findViewById(R.id.text_view); + + // 导入图像资源 + imageView.setImageResource(IMAGES[position]); + // 设置文本 + textView.setText(TITLES[position]); + + // 设置点击事件 + imageView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(mContext,ImageDetailActivity.class); + // 点击图像时,将图像资源ID和标题添加到Intent中 + intent.putExtra("image_resource", IMAGES[position]); + intent.putExtra("title", TITLES[position]); + mContext.startActivity(intent); + } + }); + + return view; + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageDetailActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageDetailActivity.java new file mode 100644 index 0000000..08abda6 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/ImageDetailActivity.java @@ -0,0 +1,27 @@ +package com.example.dazuoye.star; + +import android.os.Bundle; +import android.widget.ImageView; + +import androidx.appcompat.app.AppCompatActivity; + +import com.example.dazuoye.R; + +public class ImageDetailActivity extends AppCompatActivity { + + private ImageView mImageView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_image_detail); + + mImageView = findViewById(R.id.image_view); + + // 获取从Intent传递的图像资源ID + int imageResource = getIntent().getIntExtra("image_resource", 0); + + // 将图像资源ID设置给ImageView控件 + mImageView.setImageResource(imageResource); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/RvStaggerActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/RvStaggerActivity.java new file mode 100644 index 0000000..6d8b95d --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/RvStaggerActivity.java @@ -0,0 +1,16 @@ +package com.example.dazuoye.star; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +import com.example.dazuoye.R; + +public class RvStaggerActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisActivity.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisActivity.java new file mode 100644 index 0000000..3d04a7c --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisActivity.java @@ -0,0 +1,103 @@ +package com.example.dazuoye.star; + +import android.content.Intent; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ListView; +import android.widget.TextView; + +import androidx.appcompat.app.AppCompatActivity; + + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.StarInfobean; +import com.example.dazuoye.utils.AssetsUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import de.hdodenhof.circleimageview.CircleImageView; + +public class StarAnalysisActivity extends AppCompatActivity implements View.OnClickListener { + TextView titleTv; + ImageView backIv; + CircleImageView iconIv; + TextView nameTv,dateTv; + ListView analysisLv; + StarInfobean.StarinfoBean bean; + private Map contentlogoImgMap; + private TextView footerTv; //ListView底部布局当中需要改变的TextView + ListmDatas; + private AnalysisBaseAdapter adapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_star_analysis); +// 获取上一级界面传递过来的数据 + Intent intent = getIntent(); + bean = (StarInfobean.StarinfoBean) intent.getSerializableExtra("star"); + initView(); + mDatas = new ArrayList<>(); //初始化显示在ListView上的数据源 + adapter = new AnalysisBaseAdapter(this, mDatas); + analysisLv.setAdapter(adapter); + addDataToList(); + } + /* 加载ListView当中的数据源内容*/ + private void addDataToList() { + StarAnalysisBean sab1 = new StarAnalysisBean("新品1 ¥188", bean.getTd(), R.drawable.search_box_bg); + StarAnalysisBean sab2 = new StarAnalysisBean("新品2 ¥158", bean.getGw(), R.drawable.search_box_bg); + StarAnalysisBean sab3 = new StarAnalysisBean("新品3 ¥188", bean.getYy(),R.drawable.search_box_bg); + StarAnalysisBean sab4 = new StarAnalysisBean("新品4 ¥198", bean.getTz(), R.drawable.search_box_bg); + StarAnalysisBean sab5 = new StarAnalysisBean("新品5 ¥138", bean.getZg(),R.drawable.search_box_bg); + StarAnalysisBean sab6 = new StarAnalysisBean("新品6 ¥148", bean.getYs(),R.drawable.search_box_bg); + StarAnalysisBean sab7 = new StarAnalysisBean("新品7 ¥158", bean.getZb(),R.drawable.search_box_bg); + StarAnalysisBean sab8 = new StarAnalysisBean("新品8 ¥168", bean.getHm(), R.drawable.search_box_bg); + StarAnalysisBean sab9 = new StarAnalysisBean("新品9 ¥188", bean.getJs(),R.drawable.search_box_bg); + mDatas.add(sab1); + mDatas.add(sab2); + mDatas.add(sab3); + mDatas.add(sab4); + mDatas.add(sab5); + mDatas.add(sab6); + mDatas.add(sab7); + mDatas.add(sab8); + mDatas.add(sab9); + +// 数据源发生变化,提示适配器更新 + adapter.notifyDataSetChanged(); + } + + /* 初始化控件*/ + private void initView() { + titleTv = findViewById(R.id.title_tv); + backIv = findViewById(R.id.title_iv_back); + iconIv = findViewById(R.id.staranalysis_iv); + nameTv = findViewById(R.id.staranalysis_tv_name); + dateTv = findViewById(R.id.staranalysis_tv_date); + analysisLv = findViewById(R.id.staranalysis_lv); +// 为ListView添加底部布局 + LinearLayout footerView = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.footer_star_analysis, null); + analysisLv.addFooterView(footerView); + footerTv = footerView.findViewById(R.id.footerstar_tv_info); +// 将数据进行显示 + titleTv.setText("独衣无二"); + backIv.setOnClickListener(this); + nameTv.setText(bean.getName()); + dateTv.setText(bean.getDate()); + Map contentlogoImgMap = AssetsUtils.getContentlogoImgMap(); + Bitmap bitmap = contentlogoImgMap.get(bean.getLogoname()); + iconIv.setImageBitmap(bitmap); + footerTv.setText(bean.getInfo()); + } + + @Override + public void onClick(View v) { + finish(); + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisBean.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisBean.java new file mode 100644 index 0000000..881e353 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarAnalysisBean.java @@ -0,0 +1,37 @@ +package com.example.dazuoye.star; + +public class StarAnalysisBean { + private String title; + private String content; + private int color; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public int getColor() { + return color; + } + + public void setColor(int color) { + this.color = color; + } + + public StarAnalysisBean(String title, String content, int color) { + this.title = title; + this.content = content; + this.color = color; + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarPagerAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarPagerAdapter.java new file mode 100644 index 0000000..e0e2f71 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/StarPagerAdapter.java @@ -0,0 +1,40 @@ +package com.example.dazuoye.star; + +import android.content.Context; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; + +import androidx.annotation.NonNull; +import androidx.viewpager.widget.PagerAdapter; + +import java.util.List; + +public class StarPagerAdapter extends PagerAdapter { + Context context; + ListimgList; + public StarPagerAdapter(Context context, List imgList) { + this.context = context; + this.imgList = imgList; + } + @Override + public int getCount() { + return imgList.size(); + } + @Override + public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { + return view == object; + } + @NonNull + @Override + public Object instantiateItem(@NonNull ViewGroup container, int position) { + ImageView imageView = imgList.get(position); + container.addView(imageView); + return imageView; + } + @Override + public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { + ImageView imageView = imgList.get(position); + container.removeView(imageView); + } +} diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starBaseAdapter.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starBaseAdapter.java new file mode 100644 index 0000000..a692dfb --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starBaseAdapter.java @@ -0,0 +1,78 @@ +package com.example.dazuoye.star; + +import android.content.Context; +import android.graphics.Bitmap; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.StarInfobean; +import com.example.dazuoye.utils.AssetsUtils; + + +import java.util.List; +import java.util.Map; + +import de.hdodenhof.circleimageview.CircleImageView; + +public class starBaseAdapter extends BaseAdapter { + Context context; + List mDatas; + Map logoMap; + + public starBaseAdapter(Context context, List mDatas) { + this.context = context; + this.mDatas = mDatas; + logoMap = AssetsUtils.getLogoImgMap(); + } + + @Override + public int getCount() { + return mDatas.size(); + } + + @Override + public Object getItem(int position) { + return mDatas.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + ViewHolder holder = null; + if (convertView == null) { + convertView = LayoutInflater.from(context).inflate(R.layout.item_star_gv, null); + holder = new ViewHolder(convertView) { + }; + convertView.setTag(holder); + } else { + holder = (ViewHolder) convertView.getTag(); + } + // 获取指定位置的数据 + StarInfobean.StarinfoBean bean = mDatas.get(position); + holder.tv.setText(bean.getName()); +// 获得图片的名称,根据名称在内存当中进行查找 + String logoname = bean.getLogoname(); + Bitmap bitmap = logoMap.get(logoname); + holder.iv.setImageBitmap(bitmap); + return convertView; + } + // 对于item当中的控件进行声明和初始化的操作 + class ViewHolder { + CircleImageView iv; + TextView tv; + public ViewHolder(View view) { + iv = view.findViewById(R.id.item_star_iv); + tv = view.findViewById(R.id.item_star_tv); + } + } + } + diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starFragment.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starFragment.java new file mode 100644 index 0000000..4dbda9e --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/star/starFragment.java @@ -0,0 +1,194 @@ +package com.example.dazuoye.star; + +import android.annotation.SuppressLint; +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + +import android.os.Handler; +import android.os.Message; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.GridView; +import android.widget.ImageView; +import android.widget.LinearLayout; + +import androidx.appcompat.widget.SearchView; +import androidx.viewpager.widget.ViewPager; + +import com.example.dazuoye.R; +import com.example.dazuoye.bean.StarInfobean; + +import java.util.ArrayList; +import java.util.List; + + +public class starFragment extends Fragment { + ViewPager starVp; + GridView starGv; + LinearLayout pointlayout; + private List mDatas; + private starBaseAdapter starBaseAdapter; + private StarPagerAdapter starPagerAdapter; + // 声明图片数组 + int[] imgIds = {R.drawable.lunbotu, R.drawable.lunbotu1, R.drawable.lunbotu2, R.drawable.lunbotu3, R.drawable.lunbotu4}; + // 声明ViewPager的数据源 + List ivList; + // 声明管理指示器小圆点的集合 + List pointList; + // 完成定时装置,实现自动滑动的效果 + Handler handler = new Handler(){ + @SuppressLint("HandlerLeak") + @Override + public void handleMessage(@NonNull Message msg) { + if (msg.what == 1) { +// 获取当前ViewPager显示的页面 + int currentItem = starVp.getCurrentItem(); +// 判断是否为最后一张,如果是最后一张回到第一张,否则显示最后一张 + if (currentItem == ivList.size()-1) { + starVp.setCurrentItem(0); + }else { + currentItem++; + starVp.setCurrentItem(currentItem); + } +// 形成循环发送--接受消息的效果,在接受消息的同时,也要进行消息发送 + handler.sendEmptyMessageDelayed(1,5000); + } + } + }; + + // // TODO: Rename parameter arguments, choose names that match +// // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER +// private static final String ARG_PARAM1 = "param1"; +// private static final String ARG_PARAM2 = "param2"; +// +// // TODO: Rename and change types of parameters +// private String mParam1; +// private String mParam2; +// private List maDas; + +// public starFragment() { +// // Required empty public constructor +// } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment starFragment. + */ + // TODO: Rename and change types and number of parameters +// public static starFragment newInstance(String param1, String param2) { +// starFragment fragment = new starFragment(); +// Bundle args = new Bundle(); +// args.putString(ARG_PARAM1, param1); +// args.putString(ARG_PARAM2, param2); +// fragment.setArguments(args); +// return fragment; +// } +// +// @Override +// public void onCreate(Bundle savedInstanceState) { +// super.onCreate(savedInstanceState); +// if (getArguments() != null) { +// mParam1 = getArguments().getString(ARG_PARAM1); +// mParam2 = getArguments().getString(ARG_PARAM2); +// } +// } + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View view = inflater.inflate(R.layout.fragment_star, container, false); + initView(view); + Bundle bundle = getArguments(); + StarInfobean infoBean = (StarInfobean) bundle.getSerializable("info"); + mDatas = infoBean.getStarinfo(); +// 创建适配器 + starBaseAdapter = new starBaseAdapter(getContext(), mDatas); + starGv.setAdapter(starBaseAdapter); + initPager(); + setVPListener(); + setGVListener(); +// 延迟5秒钟发送一条消息,通知可以切换viewpager的图片了 + handler.sendEmptyMessageDelayed(1,5000); + + // 获取SearchView对象 + SearchView searchView = view.findViewById(R.id.searchview); + // 在搜索框中设置文本 + searchView.setQueryHint("请输入搜索关键字"); + + + return view; + } + /* 设置GridView的监听事件函数*/ + private void setGVListener() { + starGv.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + StarInfobean.StarinfoBean bean = mDatas.get(position); + Intent intent = new Intent(getContext(), StarAnalysisActivity.class); + intent.putExtra("star",bean); + startActivity(intent); + } + }); + } + + /* 设置ViewPager显示的页面*/ + private void initPager() { + ivList = new ArrayList<>(); + pointList = new ArrayList<>(); + for (int i = 0; i < imgIds.length; i++) { + ImageView iv = new ImageView(getContext()); + iv.setImageResource(imgIds[i]); + iv.setScaleType(ImageView.ScaleType.FIT_XY); +// 设置图片view的宽高 + LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.MATCH_PARENT); + iv.setLayoutParams(lp); +// 将图片view加载到集合当中 + ivList.add(iv); +// 创建图片对应的指示器小圆点 + ImageView piv = new ImageView(getContext()); + piv.setImageResource(R.mipmap.point_normal); + LinearLayout.LayoutParams plp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT); + plp.setMargins(20, 0, 0, 0); + piv.setLayoutParams(plp); +// 将小圆点添加到布局当中 + pointlayout.addView(piv); +// 为了便于操作,将小圆点添加到统一管理的集合中 + pointList.add(piv); + } +// 默认第一个小圆点是获取焦点的状态 + pointList.get(0).setImageResource(R.mipmap.point_focus); + starPagerAdapter = new StarPagerAdapter(getContext(), ivList); + starVp.setAdapter(starPagerAdapter); + } + + + private void initView(View view) { + starVp = view.findViewById(R.id.starfrag_vp); + starGv = view.findViewById(R.id.starfrag_gv); + pointlayout = view.findViewById(R.id.starfrag_layout); + } + /* 设置viewpager的监听器函数*/ + + private void setVPListener() { + starVp.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() { + @Override + public void onPageSelected(int position) { + for (int i = 0; i < pointList.size(); i++) { + pointList.get(i).setImageResource(R.mipmap.point_normal); + } + pointList.get(position).setImageResource(R.mipmap.point_focus); + } + }); + } +} \ No newline at end of file diff --git a/zuoyedaima/app/src/main/java/com/example/dazuoye/utils/AssetsUtils.java b/zuoyedaima/app/src/main/java/com/example/dazuoye/utils/AssetsUtils.java new file mode 100644 index 0000000..294ee36 --- /dev/null +++ b/zuoyedaima/app/src/main/java/com/example/dazuoye/utils/AssetsUtils.java @@ -0,0 +1,86 @@ +package com.example.dazuoye.utils; + +import android.content.Context; +import android.content.res.AssetManager; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; + +import com.example.dazuoye.bean.StarInfobean; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.util.BitSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AssetsUtils { + //读取assets文件夹内容存放在字符串 + private static Map logoImgMap; + private static MapcontentlogoImgMap; + public static String getJsonFromAssets(Context context, String filename) { + AssetManager am = context.getResources().getAssets(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + //获取输入流 + try { + InputStream is= am.open(filename); + //读取内容存放到内存流中 + int hasRead=0; + byte[] buf = new byte[1024]; + while (true){ + hasRead=is.read(buf); + if (hasRead==-1){ + break; + } + baos.write(buf,0,hasRead); + } + String msg=baos.toString(); + is.close();; + return msg; + } catch (Exception e) { + } + return null; + } + /* 读取Assets文件夹下的图片,返回Bitmap对象*/ + public static Bitmap getBitmapFromAssets(Context context, String filename){ + Bitmap bitmap = null; +// 获取文件夹管理者 + AssetManager am = context.getResources().getAssets(); + try { + InputStream is = am.open(filename); +// 通过位图管理器,将输入流转换成位图对象 + bitmap = BitmapFactory.decodeStream(is); + is.close(); + }catch (Exception e){ + e.printStackTrace(); + } + return bitmap; + } + + /* + * @des 将Assets文件夹当中的图片一起读取,放置到内存当中,便于管理 + * + * */ + public static void saveBitmapFromAssets(Context context, StarInfobean starInfoBean){ + logoImgMap = new HashMap<>(); + contentlogoImgMap = new HashMap<>(); + List starList = starInfoBean.getStarinfo(); + for (int i = 0; starList.size() > i; i++) { + String logoname = starList.get(i).getLogoname(); + String filename = "xzlogo/"+logoname+".png"; + Bitmap logoBm = getBitmapFromAssets(context, filename); + logoImgMap.put(logoname,logoBm); + + String contentName = "xzcontentlogo/"+logoname+".png"; + Bitmap bitmap = getBitmapFromAssets(context, contentName); + contentlogoImgMap.put(logoname,bitmap); + } + } + public static Map getLogoImgMap() { + return logoImgMap; + } + + public static Map getContentlogoImgMap() { + return contentlogoImgMap; + } +} diff --git a/zuoyedaima/app/src/main/res/drawable/address.png b/zuoyedaima/app/src/main/res/drawable/address.png new file mode 100644 index 0000000..7318be0 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/address.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/all.png b/zuoyedaima/app/src/main/res/drawable/all.png new file mode 100644 index 0000000..131c4fd Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/all.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/arrow_down.png b/zuoyedaima/app/src/main/res/drawable/arrow_down.png new file mode 100644 index 0000000..6d95bb5 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/arrow_down.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/arrow_left.png b/zuoyedaima/app/src/main/res/drawable/arrow_left.png new file mode 100644 index 0000000..365afe0 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/arrow_left.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/arrow_right.png b/zuoyedaima/app/src/main/res/drawable/arrow_right.png new file mode 100644 index 0000000..84ded85 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/arrow_right.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/background.png b/zuoyedaima/app/src/main/res/drawable/background.png new file mode 100644 index 0000000..619ad04 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/background.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/background1.png b/zuoyedaima/app/src/main/res/drawable/background1.png new file mode 100644 index 0000000..2d6c60a Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/background1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/beijing.xml b/zuoyedaima/app/src/main/res/drawable/beijing.xml new file mode 100644 index 0000000..f20d320 --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/beijing.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/btn_back.png b/zuoyedaima/app/src/main/res/drawable/btn_back.png new file mode 100644 index 0000000..20b899d Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/btn_back.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/bujuxingzhuang.xml b/zuoyedaima/app/src/main/res/drawable/bujuxingzhuang.xml new file mode 100644 index 0000000..ee498ef --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/bujuxingzhuang.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/button_login.xml b/zuoyedaima/app/src/main/res/drawable/button_login.xml new file mode 100644 index 0000000..cade81a --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/button_login.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/zuoyedaima/app/src/main/res/drawable/button_register.xml b/zuoyedaima/app/src/main/res/drawable/button_register.xml new file mode 100644 index 0000000..5567ccd --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/button_register.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/zuoyedaima/app/src/main/res/drawable/city.png b/zuoyedaima/app/src/main/res/drawable/city.png new file mode 100644 index 0000000..790fb2b Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/city.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/dapei.png b/zuoyedaima/app/src/main/res/drawable/dapei.png new file mode 100644 index 0000000..6e9a0b5 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/dapei.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/dapei1.png b/zuoyedaima/app/src/main/res/drawable/dapei1.png new file mode 100644 index 0000000..ddaf722 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/dapei1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/dingdan.png b/zuoyedaima/app/src/main/res/drawable/dingdan.png new file mode 100644 index 0000000..5d340de Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/dingdan.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/gouwuche.png b/zuoyedaima/app/src/main/res/drawable/gouwuche.png new file mode 100644 index 0000000..d284a5f Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/gouwuche.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/ic_launcher_background.xml b/zuoyedaima/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/zuoyedaima/app/src/main/res/drawable/ic_launcher_foreground.xml b/zuoyedaima/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/img.png b/zuoyedaima/app/src/main/res/drawable/img.png new file mode 100644 index 0000000..36313c3 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/img.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/img_1.png b/zuoyedaima/app/src/main/res/drawable/img_1.png new file mode 100644 index 0000000..36313c3 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/img_1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/item_gridbg.xml b/zuoyedaima/app/src/main/res/drawable/item_gridbg.xml new file mode 100644 index 0000000..e046233 --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/item_gridbg.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/kaquan.png b/zuoyedaima/app/src/main/res/drawable/kaquan.png new file mode 100644 index 0000000..289db43 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/kaquan.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/kefu.png b/zuoyedaima/app/src/main/res/drawable/kefu.png new file mode 100644 index 0000000..5d4cded Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/kefu.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/logo.png b/zuoyedaima/app/src/main/res/drawable/logo.png new file mode 100644 index 0000000..ee16bc7 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/logo.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/lunbotu.png b/zuoyedaima/app/src/main/res/drawable/lunbotu.png new file mode 100644 index 0000000..826622d Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/lunbotu.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/lunbotu1.png b/zuoyedaima/app/src/main/res/drawable/lunbotu1.png new file mode 100644 index 0000000..00e6b90 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/lunbotu1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/lunbotu2.png b/zuoyedaima/app/src/main/res/drawable/lunbotu2.png new file mode 100644 index 0000000..165566f Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/lunbotu2.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/lunbotu3.png b/zuoyedaima/app/src/main/res/drawable/lunbotu3.png new file mode 100644 index 0000000..7b48177 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/lunbotu3.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/lunbotu4.png b/zuoyedaima/app/src/main/res/drawable/lunbotu4.png new file mode 100644 index 0000000..f393f56 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/lunbotu4.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/main_rb_luck.xml b/zuoyedaima/app/src/main/res/drawable/main_rb_luck.xml new file mode 100644 index 0000000..75cadae --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/main_rb_luck.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/main_rb_me.xml b/zuoyedaima/app/src/main/res/drawable/main_rb_me.xml new file mode 100644 index 0000000..0458c9c --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/main_rb_me.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/main_rb_partner.xml b/zuoyedaima/app/src/main/res/drawable/main_rb_partner.xml new file mode 100644 index 0000000..8b03a0d --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/main_rb_partner.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/main_rb_star.xml b/zuoyedaima/app/src/main/res/drawable/main_rb_star.xml new file mode 100644 index 0000000..8ac4d0d --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/main_rb_star.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/main_rbtxt.xml b/zuoyedaima/app/src/main/res/drawable/main_rbtxt.xml new file mode 100644 index 0000000..88e11d5 --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/main_rbtxt.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/password.png b/zuoyedaima/app/src/main/res/drawable/password.png new file mode 100644 index 0000000..1c6c4f5 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/password.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/phone.png b/zuoyedaima/app/src/main/res/drawable/phone.png new file mode 100644 index 0000000..6561751 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/phone.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/point_focus.png b/zuoyedaima/app/src/main/res/drawable/point_focus.png new file mode 100644 index 0000000..3c98c3a Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/point_focus.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/point_normal.png b/zuoyedaima/app/src/main/res/drawable/point_normal.png new file mode 100644 index 0000000..880de98 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/point_normal.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/price.png b/zuoyedaima/app/src/main/res/drawable/price.png new file mode 100644 index 0000000..c7a125c Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/price.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qianbao.png b/zuoyedaima/app/src/main/res/drawable/qianbao.png new file mode 100644 index 0000000..aeeec92 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qianbao.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi1.png b/zuoyedaima/app/src/main/res/drawable/qunzi1.png new file mode 100644 index 0000000..879c2e2 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi2.png b/zuoyedaima/app/src/main/res/drawable/qunzi2.png new file mode 100644 index 0000000..e2bbe9e Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi2.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi3.png b/zuoyedaima/app/src/main/res/drawable/qunzi3.png new file mode 100644 index 0000000..5e31025 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi3.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi4.png b/zuoyedaima/app/src/main/res/drawable/qunzi4.png new file mode 100644 index 0000000..3dd77f4 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi4.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi5.png b/zuoyedaima/app/src/main/res/drawable/qunzi5.png new file mode 100644 index 0000000..329801e Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi5.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi6.png b/zuoyedaima/app/src/main/res/drawable/qunzi6.png new file mode 100644 index 0000000..151bf53 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi6.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/qunzi7.png b/zuoyedaima/app/src/main/res/drawable/qunzi7.png new file mode 100644 index 0000000..33b6d61 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/qunzi7.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/search_box_bg.xml b/zuoyedaima/app/src/main/res/drawable/search_box_bg.xml new file mode 100644 index 0000000..e7eb73a --- /dev/null +++ b/zuoyedaima/app/src/main/res/drawable/search_box_bg.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/drawable/setting.png b/zuoyedaima/app/src/main/res/drawable/setting.png new file mode 100644 index 0000000..34c2f2f Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/setting.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/sex.png b/zuoyedaima/app/src/main/res/drawable/sex.png new file mode 100644 index 0000000..acb8197 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/sex.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/shangpin1.png b/zuoyedaima/app/src/main/res/drawable/shangpin1.png new file mode 100644 index 0000000..5654c5a Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/shangpin1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/shangpin2.png b/zuoyedaima/app/src/main/res/drawable/shangpin2.png new file mode 100644 index 0000000..d48331f Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/shangpin2.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/shangyi1.png b/zuoyedaima/app/src/main/res/drawable/shangyi1.png new file mode 100644 index 0000000..fab7f23 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/shangyi1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/shangyi2.png b/zuoyedaima/app/src/main/res/drawable/shangyi2.png new file mode 100644 index 0000000..8026820 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/shangyi2.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/shangyi3.png b/zuoyedaima/app/src/main/res/drawable/shangyi3.png new file mode 100644 index 0000000..c1c226b Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/shangyi3.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/sousuo.png b/zuoyedaima/app/src/main/res/drawable/sousuo.png new file mode 100644 index 0000000..c944d7e Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/sousuo.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/sure_apssword.png b/zuoyedaima/app/src/main/res/drawable/sure_apssword.png new file mode 100644 index 0000000..0e7cee9 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/sure_apssword.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/time.png b/zuoyedaima/app/src/main/res/drawable/time.png new file mode 100644 index 0000000..8a672eb Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/time.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/touxiang.png b/zuoyedaima/app/src/main/res/drawable/touxiang.png new file mode 100644 index 0000000..f733f10 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/touxiang.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/user.png b/zuoyedaima/app/src/main/res/drawable/user.png new file mode 100644 index 0000000..47d8362 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/user.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/user_account.png b/zuoyedaima/app/src/main/res/drawable/user_account.png new file mode 100644 index 0000000..e70142a Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/user_account.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/user_general.png b/zuoyedaima/app/src/main/res/drawable/user_general.png new file mode 100644 index 0000000..cf57947 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/user_general.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/user_pay.png b/zuoyedaima/app/src/main/res/drawable/user_pay.png new file mode 100644 index 0000000..3fd6f50 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/user_pay.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/user_sex.png b/zuoyedaima/app/src/main/res/drawable/user_sex.png new file mode 100644 index 0000000..da0e318 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/user_sex.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/waitao1.png b/zuoyedaima/app/src/main/res/drawable/waitao1.png new file mode 100644 index 0000000..204ecaa Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/waitao1.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/waitao2.png b/zuoyedaima/app/src/main/res/drawable/waitao2.png new file mode 100644 index 0000000..35d6029 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/waitao2.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/waitao3.png b/zuoyedaima/app/src/main/res/drawable/waitao3.png new file mode 100644 index 0000000..751d5c4 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/waitao3.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/zhiyezhuang.png b/zuoyedaima/app/src/main/res/drawable/zhiyezhuang.png new file mode 100644 index 0000000..23ddcef Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/zhiyezhuang.png differ diff --git a/zuoyedaima/app/src/main/res/drawable/zuji.png b/zuoyedaima/app/src/main/res/drawable/zuji.png new file mode 100644 index 0000000..e95e856 Binary files /dev/null and b/zuoyedaima/app/src/main/res/drawable/zuji.png differ diff --git a/zuoyedaima/app/src/main/res/layout/activity_food_desc.xml b/zuoyedaima/app/src/main/res/layout/activity_food_desc.xml new file mode 100644 index 0000000..ce96cf2 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_food_desc.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/activity_image_detail.xml b/zuoyedaima/app/src/main/res/layout/activity_image_detail.xml new file mode 100644 index 0000000..47e541b --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_image_detail.xml @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/activity_main.xml b/zuoyedaima/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..dfd71d6 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/activity_product_detail.xml b/zuoyedaima/app/src/main/res/layout/activity_product_detail.xml new file mode 100644 index 0000000..2315768 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_product_detail.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/activity_rv_stagger.xml b/zuoyedaima/app/src/main/res/layout/activity_rv_stagger.xml new file mode 100644 index 0000000..fe8b993 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_rv_stagger.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/activity_star_analysis.xml b/zuoyedaima/app/src/main/res/layout/activity_star_analysis.xml new file mode 100644 index 0000000..2a97b72 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/activity_star_analysis.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/zuoyedaima/app/src/main/res/layout/detail_layout.xml b/zuoyedaima/app/src/main/res/layout/detail_layout.xml new file mode 100644 index 0000000..c8aeae6 --- /dev/null +++ b/zuoyedaima/app/src/main/res/layout/detail_layout.xml @@ -0,0 +1,30 @@ + + + + + + + +