Jelajahi Sumber

second commit

你好 6 bulan lalu
induk
melakukan
556582537c
100 mengubah file dengan 3774 tambahan dan 0 penghapusan
  1. 15 0
      CloudMusic2/.gitignore
  2. 3 0
      CloudMusic2/.idea/.gitignore
  3. 1 0
      CloudMusic2/.idea/.name
  4. 6 0
      CloudMusic2/.idea/compiler.xml
  5. 17 0
      CloudMusic2/.idea/deploymentTargetDropDown.xml
  6. 20 0
      CloudMusic2/.idea/gradle.xml
  7. 13 0
      CloudMusic2/.idea/inspectionProfiles/Project_Default.xml
  8. 55 0
      CloudMusic2/.idea/misc.xml
  9. 3 0
      CloudMusic2/a.txt
  10. 1 0
      CloudMusic2/app/.gitignore
  11. 44 0
      CloudMusic2/app/build.gradle
  12. 21 0
      CloudMusic2/app/proguard-rules.pro
  13. 26 0
      CloudMusic2/app/src/androidTest/java/com/example/cloudmusic/ExampleInstrumentedTest.java
  14. 54 0
      CloudMusic2/app/src/main/AndroidManifest.xml
  15. 16 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/ColorActivity.java
  16. 68 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/MyView.java
  17. 94 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/MyView2.java
  18. 30 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/SongsPro.java
  19. 31 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/TextActivity.java
  20. 55 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/TextColor.java
  21. 99 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/ToastActivity.java
  22. 207 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/FristActivity.java
  23. 118 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/MainActivity.java
  24. 231 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/PlayerActivity.java
  25. 245 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/SongListActivity.java
  26. 55 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/WelcomeActivity.java
  27. 57 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/GecAdapter.java
  28. 74 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/MusicAdapter.java
  29. 94 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/SongAdapter.java
  30. 160 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/SongListAdapter.java
  31. 97 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/StartDecoration.java
  32. 37 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/TextViewPager.java
  33. 53 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/ViewPagerAdapter.java
  34. 190 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/been/ListBeen.java
  35. 79 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/been/MineBeen.java
  36. 76 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/been/MineMusicListBeen.java
  37. 69 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/been/SongListBeen.java
  38. 27 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/BoardFragment.java
  39. 24 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/DongTaiFragment.java
  40. 48 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/HorizonScrollFragment.java
  41. 29 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/ManYouFragment.java
  42. 178 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/MineFragment.java
  43. 136 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/MusicFragment.java
  44. 29 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/SongListFragment.java
  45. 142 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Demo1.java
  46. 102 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Jive.java
  47. 25 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10086.java
  48. 70 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10087.java
  49. 56 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10088.java
  50. 61 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/ToastActivity.java
  51. 51 0
      CloudMusic2/app/src/main/java/com/example/cloudmusic/utils/OkHttpUtil.java
  52. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/aixin.png
  53. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/beforesong.png
  54. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/bofang.png
  55. 5 0
      CloudMusic2/app/src/main/res/drawable-v24/btn_text_red.xml
  56. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/down_jian_tou.png
  57. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/fenxiang.png
  58. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/fenxxiang.png
  59. 30 0
      CloudMusic2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  60. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/more2.png
  61. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/nextsong.png
  62. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/pause.png
  63. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/pinlun.png
  64. 5 0
      CloudMusic2/app/src/main/res/drawable-v24/player_img_shape.xml
  65. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/player_pinlun.png
  66. 5 0
      CloudMusic2/app/src/main/res/drawable-v24/player_vip_shape.xml
  67. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/shoucang.png
  68. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/shoucang_red.png
  69. 5 0
      CloudMusic2/app/src/main/res/drawable-v24/song_list_vip_shape.xml
  70. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/text.jpg
  71. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable-v24/xunhuan.png
  72. 10 0
      CloudMusic2/app/src/main/res/drawable/a123.xml
  73. 10 0
      CloudMusic2/app/src/main/res/drawable/a2.xml
  74. 5 0
      CloudMusic2/app/src/main/res/drawable/btn_text_white.xml
  75. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/cloudmusic_gray.png
  76. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/cloudmusic_white.png
  77. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/ear_ji.png
  78. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/er_ji2.png
  79. 5 0
      CloudMusic2/app/src/main/res/drawable/find_checked_selector.xml
  80. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/find_gray.png
  81. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/find_white.png
  82. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/firstpage.jpg
  83. 7 0
      CloudMusic2/app/src/main/res/drawable/ic_baseline_density_medium_24.xml
  84. 5 0
      CloudMusic2/app/src/main/res/drawable/ic_baseline_mic_none_24.xml
  85. 5 0
      CloudMusic2/app/src/main/res/drawable/ic_baseline_play_arrow_24.xml
  86. 170 0
      CloudMusic2/app/src/main/res/drawable/ic_launcher_background.xml
  87. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/leftback.png
  88. 5 0
      CloudMusic2/app/src/main/res/drawable/mine_checked_selector.xml
  89. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/mine_gray.png
  90. 5 0
      CloudMusic2/app/src/main/res/drawable/mine_selector_shape.xml
  91. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/mine_white.png
  92. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/more.png
  93. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/more_big_white.png
  94. 5 0
      CloudMusic2/app/src/main/res/drawable/music_checked_selector.xml
  95. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/mv.png
  96. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/people.png
  97. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/recent.png
  98. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/saoma.png
  99. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/shousuo.png
  100. TEMPAT SAMPAH
      CloudMusic2/app/src/main/res/drawable/shousuo_big_white.png

+ 15 - 0
CloudMusic2/.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

+ 3 - 0
CloudMusic2/.idea/.gitignore

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

+ 1 - 0
CloudMusic2/.idea/.name

@@ -0,0 +1 @@
+CloudMusic

+ 6 - 0
CloudMusic2/.idea/compiler.xml

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

+ 17 - 0
CloudMusic2/.idea/deploymentTargetDropDown.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="deploymentTargetDropDown">
+    <targetSelectedWithDropDown>
+      <Target>
+        <type value="QUICK_BOOT_TARGET" />
+        <deviceKey>
+          <Key>
+            <type value="VIRTUAL_DEVICE_PATH" />
+            <value value="D:\Sdk\.android\avd\Pixel_2_API_29_2.avd" />
+          </Key>
+        </deviceKey>
+      </Target>
+    </targetSelectedWithDropDown>
+    <timeTargetWasSelectedWithDropDown value="2024-05-23T09:02:37.284395200Z" />
+  </component>
+</project>

+ 20 - 0
CloudMusic2/.idea/gradle.xml

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

+ 13 - 0
CloudMusic2/.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,13 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
+    <inspection_tool class="AndroidUnresolvableTag" enabled="false" level="ERROR" enabled_by_default="false" />
+    <inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
+    <inspection_tool class="IgnoreResultOfCall" enabled="false" level="WARNING" enabled_by_default="false">
+      <option name="m_reportAllNonLibraryCalls" value="false" />
+      <option name="callCheckString" value="java.io.File,.*,java.io.InputStream,read|skip|available|markSupported,java.io.Reader,read|skip|ready|markSupported,java.lang.AbstractStringBuilder,capacity|codePointAt|codePointBefore|codePointCount|indexOf|lastIndexOf|offsetByCodePoints|substring|subSequence,java.lang.Boolean,.*,java.lang.Byte,.*,java.lang.Character,.*,java.lang.Double,.*,java.lang.Float,.*,java.lang.Integer,.*,java.lang.Long,.*,java.lang.Math,.*,java.lang.Object,equals|hashCode|toString,java.lang.Short,.*,java.lang.StrictMath,.*,java.lang.String,.*,java.lang.Thread,interrupted,java.math.BigDecimal,.*,java.math.BigInteger,.*,java.net.InetAddress,.*,java.net.URI,.*,java.nio.channels.AsynchronousChannelGroup,.*,java.util.Arrays,.*,java.util.Collections,(?!addAll).*,java.util.List,of,java.util.Map,of|ofEntries|entry,java.util.Set,of,java.util.UUID,.*,java.util.concurrent.BlockingQueue,offer|remove,java.util.concurrent.CountDownLatch,await|getCount,java.util.concurrent.ExecutorService,awaitTermination|isShutdown|isTerminated,java.util.concurrent.ForkJoinPool,awaitQuiescence,java.util.concurrent.Semaphore,tryAcquire|availablePermits|isFair|hasQueuedThreads|getQueueLength|getQueuedThreads,java.util.concurrent.locks.Condition,await|awaitNanos|awaitUntil,java.util.concurrent.locks.Lock,tryLock|newCondition,java.util.regex.Matcher,pattern|toMatchResult|start|end|group|groupCount|matches|find|lookingAt|quoteReplacement|replaceAll|replaceFirst|regionStart|regionEnd|hasTransparentBounds|hasAnchoringBounds|hitEnd|requireEnd,java.util.regex.Pattern,.*,java.util.stream.BaseStream,.*,java.util.stream.DoubleStream,.*,java.util.stream.IntStream,.*,java.util.stream.LongStream,.*,java.util.stream.Stream,.*" />
+    </inspection_tool>
+    <inspection_tool class="IntegerDivisionInFloatingPointContext" enabled="false" level="WARNING" enabled_by_default="false" />
+  </profile>
+</component>

+ 55 - 0
CloudMusic2/.idea/misc.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="DesignSurface">
+    <option name="filePathToZoomLevelMap">
+      <map>
+        <entry key="..\:/CloudMusic2/app/src/main/java/com/example/cloudmusic/MyView2.java" value="0.2" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable-v24/btn_text_red.xml" value="0.129" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable-v24/player_img_shape.xml" value="0.133" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable-v24/player_vip_shape.xml" value="0.133" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable-v24/song_list_vip_shape.xml" value="0.129" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/a123.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/a2.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/btn_text_white.xml" value="0.129" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/find_checked_selector.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/ic_baseline_density_medium_24.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/mine_checked_selector.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/mine_selector_shape.xml" value="0.133" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/music_checked_selector.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/music_checked_shape.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/song_list_text_shape.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/suoshou_shape.xml" value="0.1325" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/text_background.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/drawable/text_checked_selector.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_color.xml" value="0.12132725430597771" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_frist.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_main.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_player.xml" value="0.264" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_song_list.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_songs_pro.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_text.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_text10086.xml" value="0.128" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_toast.xml" value="0.12132725430597771" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/activity_welcome.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_borad.xml" value="0.16041666666666668" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_dong_tai.xml" value="0.11423505572441743" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_horizon_srcoll.xml" value="0.24818840579710144" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_man_you.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_mine.xml" value="0.264" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_music.xml" value="0.12132725430597771" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_song_list.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/fragment_text10087.xml" value="0.10739614994934144" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/gec_item.xml" value="0.2" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/horizon_scroll_item.xml" value="0.1" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/music_item.xml" value="0.264" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/song_item.xml" value="0.264" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/text2.xml" value="0.2" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/text3.xml" value="0.2" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/text4.xml" value="0.12132725430597771" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/text_color.xml" value="0.176" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/layout/text_item.xml" value="0.10739614994934144" />
+        <entry key="..\:/CloudMusic2/app/src/main/res/menu/menu_tabbar.xml" value="0.24947916666666667" />
+      </map>
+    </option>
+  </component>
+</project>

+ 3 - 0
CloudMusic2/a.txt

@@ -0,0 +1,3 @@
+aabcd
+hello world
+我爱你中国

+ 1 - 0
CloudMusic2/app/.gitignore

@@ -0,0 +1 @@
+/build

+ 44 - 0
CloudMusic2/app/build.gradle

@@ -0,0 +1,44 @@
+plugins {
+    id 'com.android.application'
+}
+
+android {
+    namespace 'com.example.cloudmusic'
+    compileSdk 32
+
+    defaultConfig {
+        applicationId "com.example.cloudmusic"
+        minSdk 28
+        targetSdk 32
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+
+    implementation 'androidx.appcompat:appcompat:1.4.1'
+    implementation 'com.google.android.material:material:1.5.0'
+    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
+    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.squareup.okhttp3:okhttp:4.9.0")
+    implementation 'androidx.security:security-crypto:1.1.0-alpha03'
+    implementation 'com.github.bumptech.glide:glide:4.12.0'
+    implementation 'androidx.palette:palette:1.0.0'
+
+}

+ 21 - 0
CloudMusic2/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

+ 26 - 0
CloudMusic2/app/src/androidTest/java/com/example/cloudmusic/ExampleInstrumentedTest.java

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

+ 54 - 0
CloudMusic2/app/src/main/AndroidManifest.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
+    <application
+        android:allowBackup="true"
+        android:dataExtractionRules="@xml/data_extraction_rules"
+        android:fullBackupContent="@xml/backup_rules"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/Theme.CloudMusic"
+        android:usesCleartextTraffic="true"
+        tools:targetApi="31">
+        <activity
+            android:name=".textNewUI.Text10086"
+            android:exported="true" />
+        <activity
+            android:name=".TextColor"
+            android:exported="true" />
+        <activity
+            android:name=".ToastActivity"
+            android:exported="true" />
+        <activity
+            android:name=".TextActivity"
+            android:exported="true" />
+        <activity
+            android:name=".activity.FristActivity"
+            android:exported="true" />
+        <activity
+            android:name=".activity.PlayerActivity"
+            android:exported="false" />
+        <activity
+            android:name=".activity.SongListActivity"
+            android:exported="false" />
+        <activity
+            android:name=".SongsPro"
+            android:exported="false" />
+        <activity
+            android:name=".activity.WelcomeActivity"
+            android:exported="true">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

+ 16 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/ColorActivity.java

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

+ 68 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/MyView.java

@@ -0,0 +1,68 @@
+package com.example.cloudmusic;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.CornerPathEffect;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PathEffect;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+
+import androidx.annotation.Nullable;
+
+public class MyView extends View {
+
+    private Paint paint;
+
+    public MyView(Context context) {
+        super(context);
+//        paint.setColor(Color.RED);
+//        paint.setStrokeWidth(50);
+//        paint.setStyle(Paint.Style.STROKE);
+        Log.d("1", "MyView: ");
+    }
+
+    public MyView(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        paint = new Paint();
+        paint.setColor(Color.RED);
+        paint.setAntiAlias(true);
+        paint.setStrokeWidth(20);
+        paint.setStyle(Paint.Style.STROKE);
+        paint.setStrokeJoin(Paint.Join.ROUND); // 闭合模式 坡底式 BEVEL
+                                              // MITER 正常式 ROUND 圆角式
+        PathEffect pathEffect = new CornerPathEffect(20);
+        paint.setPathEffect(pathEffect);
+        Log.d("1", "MyView: ");
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        Log.d("1", "MyView2: ");
+      //  canvas.scale(10,10); //放大 画布 10倍
+        // paint.setStrokeCap()
+        canvas.drawCircle(400,300,200,paint);
+        Path path = new Path();  //绘制路径 画一个闭合三角形
+        path.moveTo(100,700);
+        path.lineTo(300,900);
+        path.lineTo(400,600);
+        path.lineTo(500,700);
+        path.lineTo(600,100);
+        canvas.drawPath(path,paint);
+
+
+
+
+
+
+       // paint.reset();
+       // paint.setStyle(Paint.Style.FILL);
+       // paint.setColor(Color.BLUE);
+       // canvas.drawCircle(400,300,200,paint);
+       // canvas.drawLine(0,0,200,200,paint);
+    }
+}

+ 94 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/MyView2.java

@@ -0,0 +1,94 @@
+package com.example.cloudmusic;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.util.AttributeSet;
+import android.view.View;
+
+import androidx.annotation.Nullable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MyView2 extends View {
+    Paint paint;
+    private static List<String> mList;
+    private String mText;
+
+    public MyView2(Context context) {
+        super(context);
+
+    }
+
+    public MyView2(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        paint = new Paint();
+        if (mList == null) {
+            mList = new ArrayList<>();
+        }
+    }
+
+
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        @SuppressLint("DrawAllocation") Path path = new Path();
+        paint.setStyle(Paint.Style.STROKE);
+        paint.setStrokeWidth(3);
+   //     path.moveTo(0, (float) (1000-Double.parseDouble(mList.get(0))*10));
+        paint.setStrokeJoin(Paint.Join.ROUND);
+        paint.setColor(Color.rgb(223,162,87));
+        paint.setTextSize(20);
+        path.moveTo(0,1000-Float.parseFloat(mList.get(0))*10);
+        float x = 0.5F;
+        int num = -50;
+        for (int i = 0; i < mList.size(); i++) {
+            float y =  1000-Float.parseFloat(mList.get(i))*10;
+            path.lineTo(x*100,y);
+            canvas.drawText(mList.get(i)+"°",x*100,y+num,paint);
+            paint.setStyle(Paint.Style.FILL);
+            canvas.drawCircle(x*100,y,10,paint);
+            paint.setStyle(Paint.Style.STROKE);
+            x++;
+            if ((i+1)%6==0){
+                canvas.drawPath(path,paint);
+                paint.setColor(Color.rgb(11,146,243));
+                path = new Path();
+                if (i!=mList.size()-1) {
+                    path.moveTo(0, 1000 - Float.parseFloat(mList.get(i + 1)) * 10);
+                }
+                num = 50;
+                x = 0.5F;
+            }
+        }
+
+
+    //    mText = "28°";
+        paint.reset();
+
+
+        for (int i = 0; i < mList.size(); i++) {
+            float y =  1000-Float.parseFloat(mList.get(i))*10;
+
+        }
+//        mText = "Hello World!";
+//        paint.reset();
+//
+//        paint.setStrokeWidth(2);
+//        paint.setTextSize(70);
+//        canvas.drawText(mText, getWidth()/2, getHeight() / 2, paint);
+    }
+    public void setData(List<String> list) {
+        mList.addAll(list);
+    //    invalidate();
+    }
+//    public void setText(String text) {
+//        mText = text;
+//        invalidate();
+//    }
+}

+ 30 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/SongsPro.java

@@ -0,0 +1,30 @@
+package com.example.cloudmusic;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.widget.Button;
+
+import com.example.cloudmusic.activity.MainActivity;
+
+public class SongsPro extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_song_list);
+        initUI();
+    }
+
+    private void initUI() {
+        Intent intent = getIntent();
+        String id = intent.getExtras().getString("id");
+        System.out.println(id);
+        Button shit = findViewById(R.id.list_item_back);
+        shit.setOnClickListener(view -> {
+            startActivity(new Intent(SongsPro.this, MainActivity.class));
+            finish();
+        });
+    }
+}

+ 31 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/TextActivity.java

@@ -0,0 +1,31 @@
+package com.example.cloudmusic;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.os.Bundle;
+import android.view.View;
+
+import com.example.cloudmusic.R;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class TextActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_text);
+
+        List<String> list = new ArrayList<>();
+        Collections.addAll(list,"60","22","20","22","25","29");
+        List<String> list2 = new ArrayList<>();
+        Collections.addAll(list2,"14","10","12","13","16","16");
+
+        MyView2 zz = findViewById(R.id.myView2);
+        zz.setData(list);
+        MyView2 zz1 = findViewById(R.id.shit);
+        zz1.setData(list2);
+    }
+}

+ 55 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/TextColor.java

@@ -0,0 +1,55 @@
+package com.example.cloudmusic;
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Color;
+import android.graphics.drawable.GradientDrawable;
+import android.os.Bundle;
+import android.util.Log;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.palette.graphics.Palette;
+
+public class TextColor extends AppCompatActivity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.text_color);
+        Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.text2);
+        Palette palette = Palette.from(bitmap).generate();
+    //    int dominantColor = palette.getDominantColor(Color.TRANSPARENT);
+        System.out.println("hello world");
+
+        int vibrantColor = palette.getVibrantColor(0xFF000000);
+        int vibrantDarkColor = palette.getDarkVibrantColor(0xFF000000);
+        int vibrantLightColor = palette.getLightVibrantColor(0xFF000000);
+        int mutedColor = palette.getMutedColor(0xFF000000);
+        int mutedDarkColor = palette.getDarkMutedColor(0xFF000000);
+        int mutedLightColor = palette.getLightMutedColor(0xFF000000);
+
+        GradientDrawable gradientDrawable = new GradientDrawable(
+                GradientDrawable.Orientation.TR_BL,
+                new int[]{mutedColor ,vibrantDarkColor,vibrantColor}
+        );
+        findViewById(R.id.text_back).setBackground(gradientDrawable);
+
+    }
+
+
+
+
+
+    //   String colorInfo = " 鲜艳颜色: #" + Integer.toHexString(vibrantColor) +
+//        " 深艳颜色: #" + Integer.toHexString(vibrantDarkColor) +
+//
+//        " 浅艳颜色: #" + Integer.toHexString(vibrantLightColor) +
+//
+//        " 柔和颜色: #" + Integer.toHexString(mutedColor) +
+//
+//        " 深柔颜色: #" + Integer.toHexString(mutedDarkColor) +
+//
+//        " 浅柔颜色: #" + Integer.toHexString(mutedLightColor);
+//        System.out.println(colorInfo);
+//        Log.d("TAG", "onCreate: "+colorInfo);
+}

+ 99 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/ToastActivity.java

@@ -0,0 +1,99 @@
+package com.example.cloudmusic;
+
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.widget.Button;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+
+public class ToastActivity extends Activity {
+    private Button on;
+    private int number = 0;
+    private ProgressDialog progressDialog;
+    private Handler mMainHandler;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_toast);
+
+        on = findViewById(R.id.btn_on);
+        on.setOnClickListener(v -> {
+            show();
+            showProgress();
+        });
+        mMainHandler = new Handler(Looper.getMainLooper()){
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what){
+                    case 1:
+                        if ((boolean)msg.obj){
+                            Toast.makeText(ToastActivity.this, "上传完成", Toast.LENGTH_SHORT).show();
+                            progressDialog.cancel();
+                        }
+                }
+            }
+        };
+    }
+
+    private void showProgress() {
+        Handler handler = new Handler(Looper.getMainLooper()){
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what){
+                    case 1:
+                        Toast.makeText(ToastActivity.this, "到我这里了", Toast.LENGTH_SHORT).show();
+                        System.out.println((int)msg.obj );
+                        if ((int)msg.obj >= 100){
+                            mMainHandler.sendMessage(mMainHandler.obtainMessage(1,true));
+                        }
+                }
+            }
+        };
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                Looper.prepare();
+                while(number <= 100){
+                    number += 1;
+                    handler.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            progressDialog.setProgress(number);
+                        }
+                    });
+                    try {
+                        Thread.sleep(50);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+                //Toast.makeText(ToastActivity.this, "上传成功", Toast.LENGTH_SHORT).show();
+
+                Message msg = new Message();
+                msg.what = 1;
+                msg.obj = number;
+                handler.sendMessage(msg);
+                number = 0;
+                Looper.loop();
+            }
+        }).start();
+    }
+
+    private void show() {
+        progressDialog = new ProgressDialog(this);
+        progressDialog.setMax(100);
+        progressDialog.setProgress(0);
+        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+        progressDialog.setTitle("请稍等");
+        progressDialog.setMessage("当前上传进度");
+        progressDialog.show();
+    }
+}

+ 207 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/FristActivity.java

@@ -0,0 +1,207 @@
+package com.example.cloudmusic.activity;
+
+import androidx.annotation.NonNull;
+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.os.Handler;
+import android.os.Message;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.fragment.MineFragment;
+import com.example.cloudmusic.utils.OkHttpUtil;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+public class FristActivity extends AppCompatActivity {
+
+    private RadioGroup rg_group;
+    private FragmentManager manager;
+    private MainActivity mainFragment;
+    private MineFragment mineFragment;
+    private Fragment nowFragemnt;
+    private Handler mHandler;
+    private FrameLayout fragment2;
+    private FrameLayout fragment1;
+    private MainActivity mainActivity1;
+    private MainActivity mainActivity2;
+    private MainActivity mainActivity3;
+    private MainActivity mainActivity4;
+    private FrameLayout fragment3;
+    private FrameLayout fragment4;
+
+    @SuppressLint("HandlerLeak")
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_frist);
+        openShow();
+        chooseOne();
+        rg_group = findViewById(R.id.rg_group);
+        RadioButton rg_one = findViewById(R.id.rg_one);
+        rg_group.check(R.id.rg_one);
+        rg_group.setOnCheckedChangeListener((radioGroup, i) -> {
+            switch (radioGroup.getCheckedRadioButtonId()){
+                case R.id.rg_one:
+                    findViewById(R.id.first_s).setBackgroundResource(R.color.white);
+                    findViewById(R.id.first_b).setVisibility(View.VISIBLE);
+                    openShow();
+                    chooseOne();
+                    break;
+                case R.id.rg_two:
+                    System.out.println("hello world");
+                    closeShow();
+                    chooseOne();
+                    break;
+                case R.id.rg_three:
+                    closeShow();
+                    startNewPage();
+                    startActivity(new Intent(this,PlayerActivity.class));
+                    break;
+                case R.id.rg_four:
+                    closeShow();
+                    chooseOne();
+                    break;
+                case R.id.rg_five:
+                    closeShow();
+                    findViewById(R.id.first_s).setBackgroundResource(R.color.mineColor);
+                    findViewById(R.id.first_b).setVisibility(View.INVISIBLE);
+                    chooseFive();
+                    break;
+            }
+        });
+
+        mHandler = new Handler(){
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what){
+                    case 1:
+                        String id = (String) msg.obj;
+                        Intent intent = new Intent(FristActivity.this,PlayerActivity.class);
+                        Bundle bundle = new Bundle();
+                        System.out.println(msg.obj);
+                        bundle.putString("id", id);
+                        bundle.putString("songListName","漫游");
+                        intent.putExtras(bundle);
+                        startActivity(intent);
+                }
+            }
+        };
+    }
+
+    private void openShow() {
+        fragment1 = findViewById(R.id.fragment_1);
+        fragment2 = findViewById(R.id.fragment_2);
+        fragment3 = findViewById(R.id.fragment_3);
+        fragment4 = findViewById(R.id.fragment_4);
+        fragment1.setVisibility(View.VISIBLE);
+        fragment2.setVisibility(View.VISIBLE);
+        fragment3.setVisibility(View.VISIBLE);
+        fragment4.setVisibility(View.VISIBLE);
+    }
+    private void closeShow() {
+        fragment1.setVisibility(View.GONE);
+        fragment3.setVisibility(View.GONE);
+        fragment4.setVisibility(View.GONE);
+        fragment2.setVisibility(View.GONE);
+    }
+
+    private void startNewPage() {
+        OkHttpUtil util = new OkHttpUtil();
+        util.sendGetRequest("http://192.168.86.158:3000/personalized/newsong?limit=1", new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String string = response.body().string();
+                    JSONObject object = new JSONObject(string);
+                    JSONArray array = object.optJSONArray("result");
+                    JSONObject json = (JSONObject) array.get(0);
+                    String id = json.optString("id");
+                    Message msg = new Message();
+                    msg.what = 1;
+                    msg.obj = id;
+                    mHandler.sendMessage(msg);
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+    private void chooseOne() {
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        if (mainFragment==null){
+            mainFragment = new MainActivity();
+            mainActivity1 = new MainActivity();
+            mainActivity2 = new MainActivity();
+            mainActivity3 = new MainActivity();
+            mainActivity4 = new MainActivity();
+        }
+        hideAllFragment(transaction);
+        transaction.add(R.id.fragment,mainFragment);
+        transaction.add(R.id.fragment_1, mainActivity1);
+        transaction.add(R.id.fragment_2, mainActivity2);
+        transaction.add(R.id.fragment_3, mainActivity3);
+        transaction.add(R.id.fragment_4, mainActivity4);
+        //显示Fragment
+        transaction.show(mainFragment);
+        //记录Fragment
+        nowFragemnt = mainFragment;
+        //提交事务
+        transaction.commit();
+    }
+    private void chooseFive() {
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        if (mineFragment==null){
+            mineFragment = new MineFragment();
+        }
+        hideAllFragment(transaction);
+        transaction.add(R.id.fragment,mineFragment);
+        //显示Fragment
+        transaction.show(mineFragment);
+        //记录Fragment
+        nowFragemnt = mineFragment;
+        //提交事务
+        transaction.commit();
+    }
+    private void hideAllFragment(FragmentTransaction transaction){
+        if (mainFragment!= null){
+            transaction.remove(mainFragment);
+            transaction.remove(mainActivity1);
+            transaction.remove(mainActivity2);
+            transaction.remove(mainActivity3);
+            transaction.remove(mainActivity4);
+        }
+        if (mineFragment!= null){
+            transaction.remove(mineFragment);
+        }
+        if (mainFragment!= null){
+            transaction.remove(mainFragment);
+        }
+        if (mineFragment!= null){
+            transaction.remove(mineFragment);
+        }
+    }
+}

+ 118 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/MainActivity.java

@@ -0,0 +1,118 @@
+package com.example.cloudmusic.activity;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.been.SongListBeen;
+import com.example.cloudmusic.adapter.SongListAdapter;
+import com.example.cloudmusic.utils.OkHttpUtil;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+public class MainActivity extends Fragment {
+
+    private Handler mHandler;
+    private SongListAdapter adapter;
+    private List<SongListBeen> recommendList;
+    private View root;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        root = inflater.inflate(R.layout.activity_main, container, false);
+        initUI();
+        return root;
+    }
+
+    @SuppressLint("HandlerLeak")
+    private void initUI() {
+        recommendList = new ArrayList<>();
+
+        adapter = new SongListAdapter(recommendList, root.getContext());
+        TextView shit = root.findViewById(R.id.horizon_title);
+        shit.setText("推荐歌单");
+        RecyclerView recycler = root.findViewById(R.id.horizon_recycler);
+        LinearLayoutManager manager = new LinearLayoutManager(root.getContext(), RecyclerView.HORIZONTAL, false);
+        recycler.setAdapter(adapter);
+        recycler.setLayoutManager(manager);
+        initRequest("http://192.168.86.158:3000/personalized?limit=10",1);
+        mHandler = new Handler(){
+            @SuppressLint("NotifyDataSetChanged")
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what){
+                    case 1:
+                        recommendList.addAll((Collection<? extends SongListBeen>) msg.obj);
+                        adapter.notifyDataSetChanged();
+                      //  Looper.loop();
+                }
+            }
+        };
+    }
+
+    private void initRequest(String url,int msg) {
+        List<SongListBeen> list = new ArrayList<>();
+        OkHttpUtil okHttpUtil = OkHttpUtil.getInstance();
+        okHttpUtil.sendGetRequest(url, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String body = response.body().string();
+                    JSONObject res = new JSONObject(body);
+                    JSONArray result = res.optJSONArray("result");
+                    for (int i = 0; i < result.length(); i++) {
+                        JSONObject json = (JSONObject) result.get(i);
+                        String name = json.optString("name");
+                        String id = json.optString("id");
+                        String picUrl = json.optString("picUrl");
+                        String playCount = json.optString("playCount");
+                        SongListBeen been = new SongListBeen(name, picUrl, id, playCount);
+                        list.add(been);
+                    }
+                    Message message = new Message();
+                    message.obj = list;
+                    message.what = msg;
+                    mHandler.sendMessage(message);
+                  //  mHandler.getLooper().quit();
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+            @Override
+            public void failure(Call call, IOException e) {
+                e.printStackTrace();
+                Log.d("failure: ", e.getMessage());
+            }
+        });
+
+    }
+}

+ 231 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/PlayerActivity.java

@@ -0,0 +1,231 @@
+package com.example.cloudmusic.activity;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.bumptech.glide.Glide;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.adapter.GecAdapter;
+import com.example.cloudmusic.been.ListBeen;
+import com.example.cloudmusic.utils.OkHttpUtil;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.StringJoiner;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+public class PlayerActivity extends AppCompatActivity {
+
+    private String id = "2158973221";
+    private TextView song;
+    private TextView author;
+    private TextView title;
+    private TextView vipText;
+    private TextView maxTime;
+    private ImageView img;
+    private Handler mHandler;
+    private List<String> list;
+    private RecyclerView recycler;
+    private GecAdapter adapter;
+    private String listName;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_player);
+
+        initUI();
+
+        initData();
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        getIntent().removeExtra("id");
+        getIntent().removeExtra("songListName");
+    }
+
+    @SuppressLint({"SetTextI18n", "HandlerLeak"})
+    private void initUI() {
+        if (getIntent().getExtras() != null) {
+            String data = getIntent().getExtras().getString("id");
+            if (data != null) {
+                id = getIntent().getExtras().getString("id");
+                listName = getIntent().getExtras().getString("songListName");
+                initSong();
+            } else {
+                System.out.println("数据为空");
+            }
+        } else {
+            System.out.println("没得");
+        }
+
+        //listName = intent.getExtras().getString("songListName");
+        //id = intent.getExtras().getString("id");
+        song = findViewById(R.id.player_songName);
+        author = findViewById(R.id.player_authorName);
+        img = findViewById(R.id.player_img);
+        title = findViewById(R.id.player_title);
+        vipText = findViewById(R.id.player_vip);
+        maxTime = findViewById(R.id.player_song_maxTime);
+        list = new ArrayList<>();
+
+        findViewById(R.id.player_back).setOnClickListener(v -> finish());
+
+
+        LinearLayout page1 = findViewById(R.id.player_page);
+        TextView back = findViewById(R.id.gec_back);
+        LinearLayout page2 = findViewById(R.id.player_page2);
+        page1.setOnClickListener(v -> {
+            page1.setVisibility(View.GONE);
+            page2.setVisibility(View.VISIBLE);
+        });
+        back.setOnClickListener(v -> {
+            page2.setVisibility(View.GONE);
+            page1.setVisibility(View.VISIBLE);
+        });
+
+        mHandler = new Handler() {
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what) {
+                    case 1:
+                        list.addAll((Collection<? extends String>) msg.obj);
+                        adapter.notifyDataSetChanged();
+                        break;
+                    case 2:
+                        ListBeen.Song song2 = (ListBeen.Song) msg.obj;
+                        String imgPath = song2.getSongImg();
+                        String songLength = song2.getDt();
+                        boolean vip = song2.isVip();
+                        String songName = song2.getSongName();
+                        String authorName = song2.getAuthorName();
+                        int time = (int) TimeUnit.MILLISECONDS.toSeconds(Integer.parseInt(songLength));
+                        maxTime.setText("0" + time / 60 + ":" + time % 60);
+                        song.setText(songName);
+                        author.setText(authorName + " >");
+                        title.setText(listName);
+                        if (vip) {
+                            vipText.setVisibility(View.VISIBLE);
+                        }
+                        Glide.with(PlayerActivity.this)
+                                .load(imgPath)
+                                .placeholder(R.drawable.text)
+                                .into(img);
+                }
+            }
+        };
+
+        recycler = findViewById(R.id.player_recycler);
+        LinearLayoutManager manager = new LinearLayoutManager(this);
+        adapter = new GecAdapter(list, this);
+        recycler.setLayoutManager(manager);
+        recycler.setAdapter(adapter);
+    }
+
+    private void initData() {
+        OkHttpUtil util = OkHttpUtil.getInstance();
+        util.sendGetRequest("http://192.168.86.158:3000/lyric?id=" + id, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String body = response.body().string();
+                    JSONObject object = new JSONObject(body);
+                    JSONObject json = object.optJSONObject("lrc");
+                    String content = json.optString("lyric");
+                    String[] split = content.split("\\n");
+                    List<String> list = new ArrayList<>();
+                    for (String s : split) {
+                        int start = s.indexOf("[");
+                        int end = s.indexOf("]");
+                        String substring = s.substring(start, end + 1);
+                        s = s.replace(substring, "");
+                        list.add(s);
+                    }
+                    Message msg = new Message();
+                    msg.what = 1;
+                    msg.obj = list;
+                    mHandler.sendMessage(msg);
+
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+    private void initSong() {
+        OkHttpUtil util = OkHttpUtil.getInstance();
+        util.sendGetRequest("http://192.168.86.158:3000/song/detail?ids=" + id, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String body = response.body().string();
+                    JSONObject j = new JSONObject(body);
+                    JSONArray arr = j.optJSONArray("songs");
+                    JSONObject json = (JSONObject) arr.get(0);
+                    String singName = json.optString("name");
+                    JSONArray arr2 = json.getJSONArray("ar");
+                    StringJoiner authorName = null;
+                    for (int i = 0; i < arr2.length(); i++) {
+                        JSONObject json1 = (JSONObject) arr2.get(i);
+                        String name = json1.optString("name");
+                        authorName = new StringJoiner("/");
+                        authorName.add(name);
+                    }
+                    JSONObject json2 = json.optJSONObject("al");
+                    String imgURL = json2.optString("picUrl");
+                    String fee = json.optString("fee");
+                    String id = json.optString("id");
+                    String dt = json.optString("dt");
+                    ListBeen.Song song = new ListBeen.Song();
+                    if (!fee.equals("0")) {
+                        song.setVip(true);
+                    }
+                    song.setId(id);
+                    song.setSongName(singName);
+                    song.setAuthorName(String.valueOf(authorName));
+                    song.setDt(dt);
+                    song.setSongImg(imgURL);
+                    Message msg = new Message();
+                    msg.what = 2;
+                    msg.obj = song;
+                    mHandler.sendMessage(msg);
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+}

+ 245 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/SongListActivity.java

@@ -0,0 +1,245 @@
+package com.example.cloudmusic.activity;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.bumptech.glide.Glide;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.adapter.SongAdapter;
+import com.example.cloudmusic.adapter.StartDecoration;
+import com.example.cloudmusic.been.ListBeen;
+import com.example.cloudmusic.utils.OkHttpUtil;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+public class SongListActivity extends AppCompatActivity {
+
+    private String id;
+    private ListBeen been;
+    private Handler mHandler;
+    private TextView title;
+    private TextView title1;
+    private TextView jieS;
+    private TextView fenX;
+    private TextView pinL;
+    private TextView shouC;
+    private TextView songNumber;
+    private ImageView back;
+    private RecyclerView recycler;
+    private  List<ListBeen.Song> songs;
+    private String name = "";
+    private ScrollView scroll;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_song_list);
+        initUI();
+    }
+
+    @SuppressLint("HandlerLeak")
+    private void initUI() {
+        Intent intent = getIntent();
+        id = intent.getExtras().getString("id");
+        name = intent.getExtras().getString("name");
+        Button shit = findViewById(R.id.list_item_back);
+        title1 = findViewById(R.id.list_item_title);
+        jieS = findViewById(R.id.list_item_jieshao);
+        fenX = findViewById(R.id.list_item_fenx);
+        pinL = findViewById(R.id.list_item_pinl);
+        shouC = findViewById(R.id.list_item_shouc);
+        songNumber = findViewById(R.id.list_item_song_number);
+        back = findViewById(R.id.list_item_back2);
+        recycler = findViewById(R.id.song_recycler);
+        scroll = findViewById(R.id.scroll);
+
+       // initListener();
+
+        shit.setOnClickListener(view -> {
+            finish();
+        });
+        startData();
+        songs = new ArrayList<>();
+        LinearLayoutManager manager = new LinearLayoutManager(SongListActivity.this);
+        SongAdapter adapter = new SongAdapter(songs,SongListActivity.this);
+        recycler.setAdapter(adapter);
+        recycler.setLayoutManager(manager);
+        recycler.setNestedScrollingEnabled(false);
+        recycler.addItemDecoration(new StartDecoration(this));
+       // recycler.setHasFixedSize(true);
+
+        mHandler = new Handler(){
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what){
+                    case 1:
+                        been = (ListBeen) msg.obj;
+                        if (been.getName().length()>8){
+                        title1.setText(been.getName().substring(0,8));
+                        }else{
+                            title1.setText(been.getName().substring(0,been.getName().length()));
+                        }
+                        jieS.setText(been.getDescription());
+                        fenX.setText(been.getShareCount());
+                        pinL.setText(been.getCommentCount());
+                        shouC.setText(been.getSubscribedCount());
+                        songNumber.setText("( "+been.getTrackCount()+" )");
+                        Glide.with(SongListActivity.this)
+                                .load(been.getImgURL())
+                                .placeholder(R.drawable.cloudmusic_gray)
+                                .into(back);
+                    case 2:
+                      //  songs.addAll((Collection<? extends ListBeen.Song>) msg.obj);
+                        been.setSongList(songs);
+                        System.out.println(been.getSongList().size());
+                        adapter.notifyDataSetChanged();
+                }
+            }
+        };
+
+       // FrameLayout fragment = findViewById(R.id.abc_h);
+       // LinearLayout layout = findViewById(R.id.add_c);
+       // FrameLayout frameLayout = new FrameLayout(this);
+       // frameLayout.addView(layout);
+       // frameLayout.addView(fragment);
+
+       // setContentView(frameLayout);
+    }
+
+    @SuppressLint("ClickableViewAccessibility")
+    private void initListener() {
+        //recycler.setOnTouchListener((view, motionEvent) -> true);
+        scroll.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View view, MotionEvent motionEvent) {
+                if (motionEvent.getAction() == MotionEvent.ACTION_MOVE) {
+                    // 取消RecyclerView的滚动事件
+                    recycler.dispatchTouchEvent(MotionEvent.obtain(motionEvent.getDownTime(), motionEvent.getEventTime(), MotionEvent.ACTION_CANCEL, motionEvent.getX(), motionEvent.getY(), motionEvent.getMetaState()));
+                }
+                return false;
+            }
+        });
+    }
+
+    private void startData() {
+        OkHttpUtil okHttpUtil = new OkHttpUtil();
+        okHttpUtil.sendGetRequest("http://192.168.86.158:3000/playlist/detail?id="+id, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String body = response.body().string();
+                    JSONObject j = new JSONObject(body);
+                    JSONObject result = j.optJSONObject("playlist");
+                    String id = result.optString("id");
+                    String name = result.optString("name");
+                    String imgURL = result.optString("coverImgUrl");
+                    String description = result.optString("description");
+                    String trackCount = result.optString("trackCount");
+                    String subscribedCount = result.optString("subscribedCount");
+                    String shareCount = result.optString("shareCount");
+                    String commentCount = result.optString("commentCount");
+                    ListBeen been = new ListBeen();
+                    been.setDescription(description);
+                    been.setCommentCount(commentCount);
+                    been.setImgURL(imgURL);
+                    been.setName(name);
+                    been.setTrackCount(trackCount);
+                    been.setSubscribedCount(subscribedCount);
+                    been.setShareCount(shareCount);
+                    Message msg = new Message();
+                    msg.what = 1;
+                    msg.obj = been;
+                    mHandler.sendMessage(msg);
+
+                } catch (JSONException | IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+
+        okHttpUtil.sendGetRequest("http://192.168.86.158:3000/playlist/track/all?id="+id, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                String body;
+                List<ListBeen.Song> list = new ArrayList<>();
+                try {
+                    body = response.body().string();
+                    JSONObject j = new JSONObject(body);
+                    JSONArray result = j.optJSONArray("songs");
+                    for (int i = 0; i < result.length(); i++) {
+                        JSONObject json = (JSONObject) result.get(i);
+                        String singName = json.optString("name");
+                        JSONObject json1 = (JSONObject) json.getJSONArray("ar").get(0);
+                        String authorName = json1.optString("name");
+                        JSONObject json2 = json.optJSONObject("al");
+                        String ListName = json2.optString("name");
+                        String imgURL = json2.optString("picUrl");
+                        String fee = json.optString("fee");
+                        String mv = json.optString("mv");
+                        String id = json.optString("id");
+                        String dt = json.optString("dt");
+                        ListBeen.Song song = new ListBeen.Song();
+                        if (!fee.equals("0")){
+                            song.setVip(true);
+                        }
+                        if (!mv.equals("0")){
+                            song.setMv(true);
+                        }
+                        song.setId(id);
+                        song.setSongName(singName);
+                        song.setAuthorName(authorName);
+                        song.setListName(ListName);
+                        song.setSongNumber(String.valueOf(i+1));
+                        song.setSongListName(name);
+                        song.setDt(dt);
+                        song.setSongImg(imgURL);
+                        list.add(song);
+                    }
+                    Message msg = new Message();
+                    msg.what = 2;
+                    msg.obj = list;
+                    songs.addAll(list);
+                    mHandler.sendMessage(msg);
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+}

+ 55 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/activity/WelcomeActivity.java

@@ -0,0 +1,55 @@
+package com.example.cloudmusic.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.example.cloudmusic.R;
+
+public class WelcomeActivity extends AppCompatActivity {
+
+    private int second;
+    private Button tv_skip;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_welcome);
+        tv_skip = findViewById(R.id.tv_skip);
+
+        new CountDownTimer(4000,1000) {
+            @Override
+            public void onTick(long l) {
+            }
+            @Override
+            public void onFinish() {
+                LinearLayout view = findViewById(R.id.back);
+                view.setBackgroundResource(R.mipmap.second_welcome_page);
+                findViewById(R.id.shit).setVisibility(View.VISIBLE);
+            }
+        }.start();
+
+
+        tv_skip.setOnClickListener(view -> {
+            startActivity(new Intent(WelcomeActivity.this,FristActivity.class));
+            finish();
+        });
+        new CountDownTimer(4000,1000) {
+            @Override
+            public void onTick(long l) {
+
+            }
+
+            @Override
+            public void onFinish() {
+                startActivity(new Intent(WelcomeActivity.this,FristActivity.class));
+                finish();
+            }
+        }.start();
+    }
+}

+ 57 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/GecAdapter.java

@@ -0,0 +1,57 @@
+package com.example.cloudmusic.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.cloudmusic.R;
+
+import java.util.List;
+
+public class GecAdapter extends RecyclerView.Adapter<GecAdapter.InnerHolder> {
+
+    private final List<String> mList;
+    private final Context mContext;
+
+    public GecAdapter(List<String> list, Context context) {
+        mList = list;
+        mContext = context;
+    }
+
+    @NonNull
+    @Override
+    public GecAdapter.InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new GecAdapter.InnerHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.gec_item,parent,false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull GecAdapter.InnerHolder holder, int position) {
+        holder.setData(mList.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        if (mList != null)
+            return mList.size();
+        return 0;
+    }
+
+    public class InnerHolder extends RecyclerView.ViewHolder {
+
+        private final TextView gec;
+
+        public InnerHolder(@NonNull View itemView) {
+            super(itemView);
+            gec = itemView.findViewById(R.id.gec_text);
+        }
+
+        public void setData(String s) {
+            gec.setText(s);
+        }
+    }
+}

+ 74 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/MusicAdapter.java

@@ -0,0 +1,74 @@
+package com.example.cloudmusic.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.bumptech.glide.Glide;
+import com.example.cloudmusic.been.MineMusicListBeen;
+import com.example.cloudmusic.R;
+
+import java.util.List;
+
+public class MusicAdapter extends RecyclerView.Adapter<MusicAdapter.InnerHolder> {
+
+    private final Context mContext;
+    private final List<MineMusicListBeen> mList;
+
+    public MusicAdapter(List<MineMusicListBeen> list, Context context) {
+        mList = list;
+        mContext = context;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return super.getItemViewType(position);
+    }
+
+    @NonNull
+    @Override
+    public MusicAdapter.InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new MusicAdapter.InnerHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.music_item,parent,false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull MusicAdapter.InnerHolder holder, int position) {
+        holder.setData(mList.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        if (mList != null)
+            return mList.size();
+        return 0;
+    }
+
+    public class InnerHolder extends RecyclerView.ViewHolder {
+
+        private final ImageView img;
+        private final TextView title;
+        private final TextView content;
+
+        public InnerHolder(@NonNull View itemView) {
+            super(itemView);
+            img = itemView.findViewById(R.id.music_img);
+            title = itemView.findViewById(R.id.music_title);
+            content = itemView.findViewById(R.id.music_content);
+        }
+
+        public void setData(MineMusicListBeen been) {
+            Glide.with(mContext)
+                    .load(been.getCoverImgUrl())
+                    .placeholder(R.drawable.cloudmusic_white)
+                    .into(img);
+            title.setText(been.getName());
+            content.setText("歌单-"+been.getCount()+"首-"+been.getAuthor());
+        }
+    }
+}

+ 94 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/SongAdapter.java

@@ -0,0 +1,94 @@
+package com.example.cloudmusic.adapter;
+
+import static androidx.core.content.ContextCompat.startActivity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.cloudmusic.activity.PlayerActivity;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.been.ListBeen;
+
+import java.util.List;
+
+public class SongAdapter extends RecyclerView.Adapter<SongAdapter.InnerHolder> {
+
+    private final List<ListBeen.Song> mList;
+    private final Context mContext;
+
+    public SongAdapter(List<ListBeen.Song> list, Context context) {
+        mList = list;
+        mContext = context;
+    }
+
+    @NonNull
+    @Override
+    public SongAdapter.InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new InnerHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.song_item,parent,false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull SongAdapter.InnerHolder holder, int position) {
+        holder.setData(mList.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        if (mList != null)
+            return mList.size();
+        return 0;
+    }
+
+    public class InnerHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
+
+        private final TextView number;
+        private final TextView song_name;
+        private final TextView song_author;
+        private final ImageView mv;
+        private final TextView vip;
+        private ListBeen.Song song1;
+
+        public InnerHolder(@NonNull View itemView) {
+            super(itemView);
+            number = itemView.findViewById(R.id.bianh);
+            song_name = itemView.findViewById(R.id.song_name);
+            song_author = itemView.findViewById(R.id.song_author);
+            mv = itemView.findViewById(R.id.song_item_mv);
+            vip = itemView.findViewById(R.id.song_item_vip);
+
+            itemView.setOnClickListener(this);
+        }
+
+        public void setData(ListBeen.Song song) {
+            song1 = song;
+            number.setText(song.getSongNumber());
+            song_name.setText(song.getSongName());
+            song_author.setText(song.getAuthorName()+"-"+song.getListName());
+            if (song.isMv()){
+                mv.setVisibility(View.VISIBLE);
+            }
+            if (song.isVip()){
+                vip.setVisibility(View.VISIBLE);
+            }
+        }
+
+        @Override
+        public void onClick(View view) {
+            Intent intent = new Intent(mContext, PlayerActivity.class);
+            Bundle bundle = new Bundle();
+            bundle.putString("id",song1.getId());
+            bundle.putString("songListName",song1.getSongListName());
+            intent.putExtras(bundle);
+            startActivity(mContext,intent,bundle);
+        }
+    }
+}

+ 160 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/SongListAdapter.java

@@ -0,0 +1,160 @@
+package com.example.cloudmusic.adapter;
+
+import static androidx.core.content.ContextCompat.startActivity;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.activity.SongListActivity;
+import com.example.cloudmusic.been.SongListBeen;
+
+import java.util.List;
+
+public class SongListAdapter extends RecyclerView.Adapter<SongListAdapter.InnerHolder> {
+
+    private final List<SongListBeen> mList;
+    private final Context mContext;
+    private Handler mHandler;
+
+    public SongListAdapter(List<SongListBeen> list, Context context) {
+        mList = list;
+        mContext = context;
+    }
+
+    public boolean isGroupHead(int position){
+        if(position == 0){
+            return true;
+        }else{
+            String currentGroupName = getGroupName(position);
+            String preGroupName = getGroupName(position - 1);
+            if (currentGroupName.equals(preGroupName)){
+                return false;
+            }else
+                return true;
+        }
+    }
+
+    @NonNull
+    @Override
+    public SongListAdapter.InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new InnerHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.horizon_scroll_item,parent,false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull SongListAdapter.InnerHolder holder, int position) {
+        holder.setData(mList.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        if (mList == null)
+            return 0;
+        return mList.size();
+    }
+
+    public String getGroupName(int position){
+        return mList.get(position).getName();
+    }
+
+    public class InnerHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
+
+        private final TextView tv_people_number;
+        private final TextView tv_product;
+        private final ImageView item;
+        private final TextView title;
+        private SongListBeen been;
+
+        public InnerHolder(@NonNull View itemView) {
+            super(itemView);
+            tv_people_number = itemView.findViewById(R.id.people_number);
+            tv_product = itemView.findViewById(R.id.sing_product);
+            item = itemView.findViewById(R.id.horizon_item);
+            title = itemView.findViewById(R.id.horizon_title);
+
+            itemView.setOnClickListener(this);
+        }
+
+        @SuppressLint("HandlerLeak")
+        public void setData(SongListBeen been) {
+            this.been = been;
+            tv_people_number.setText(Integer.parseInt(been.getPlayCount()) / 10000 + "万");
+            try {
+                RequestOptions requestOptions = new RequestOptions()
+                        .diskCacheStrategy(DiskCacheStrategy.ALL);
+
+                Glide.with(mContext)
+                        .load(been.getPicUr())
+                        .apply(requestOptions)
+                        .placeholder(R.drawable.cloudmusic_gray)
+                        .error(R.drawable.cloudmusic_white)
+                        .into(item);
+            } catch (Exception e) {
+                e.printStackTrace();
+                // 处理异常,例如显示默认图片或者提示用户
+            }
+            title.setText(been.getName());
+            tv_product.setText(been.getName().substring(0,5));
+            mHandler = new Handler(){
+                @Override
+                public void handleMessage(@NonNull Message msg) {
+                    super.handleMessage(msg);
+                    switch (msg.what){
+                        case 1: item.setImageBitmap((Bitmap) msg.obj);
+                    }
+                }
+            };
+        }
+        @Override
+        public void onClick(View view) {
+            Intent intent = new Intent(mContext, SongListActivity.class);
+            Bundle bundle = new Bundle();
+            bundle.putString("name",been.getName());
+            bundle.putString("id",been.getId());
+            intent.putExtras(bundle);
+            startActivity(mContext,intent,bundle);
+        }
+
+
+
+
+
+//        private void getIma(String picUr,int what) {
+//            if (!picUr.isEmpty()) {
+//                try {
+//                    URL url = new URL(picUr);
+//                    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+//                    connection.setDoInput(true);
+//                    connection.connect();
+//                    InputStream input = connection.getInputStream();
+//                    Bitmap myBitmap = BitmapFactory.decodeStream(input);
+//                    input.close();
+//                    Message msg = new Message();
+//                    msg.what = what;
+//                    msg.obj = myBitmap;
+//                    mHandler.sendMessage(msg);
+//                } catch (IOException e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//        }
+
+    }
+}
+

+ 97 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/StartDecoration.java

@@ -0,0 +1,97 @@
+package com.example.cloudmusic.adapter;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+public class StartDecoration extends RecyclerView.ItemDecoration {
+    private int groupHeadHeight;
+    private Context context;
+    private Paint mPaint;
+    private Paint headPaint;
+    public StartDecoration(Context context) {
+        super();
+        this.context = context;
+        mPaint = new Paint();
+        headPaint = new Paint();
+        mPaint.setAntiAlias(true);
+        mPaint.setColor(Color.WHITE);
+        mPaint.setStyle(Paint.Style.FILL);
+        mPaint.setTextSize(50);
+        headPaint.setColor(Color.RED);
+    }
+
+    @Override
+    public void onDraw(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
+        super.onDraw(c, parent, state);
+        if (parent.getAdapter() instanceof SongListAdapter){
+            SongListAdapter starAdapter = (SongListAdapter) parent.getAdapter();
+            //当前屏幕的item个数
+            int count = parent.getChildCount();
+            int left = parent.getPaddingLeft();
+            int right = parent.getWidth() - parent.getPaddingRight();
+            for (int i = 0; i < count; i++) {
+                View view = parent.getChildAt(i);
+                int position = parent.getChildLayoutPosition(view);
+                //是头部
+                if(i>6){
+                    c.drawRect(left, view.getTop()-groupHeadHeight,right,view.getTop(),headPaint);
+                    c.drawText("播放全部",left+10,view.getTop()-groupHeadHeight/2+10,
+                            mPaint);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
+        super.onDrawOver(c, parent, state);
+        if(parent.getAdapter() instanceof SongListAdapter){
+            SongListAdapter starAdapter = (SongListAdapter) parent.getAdapter();
+            int left = parent.getPaddingLeft();
+            int top = parent.getPaddingTop();
+            int right = parent.getWidth() - parent.getPaddingRight();
+            int position = ((LinearLayoutManager) parent.getLayoutManager()).findFirstVisibleItemPosition();
+            //获取对应VIew
+            View view = parent.findViewHolderForAdapterPosition(position).itemView;
+            boolean isGroupHead = starAdapter.isGroupHead(position+1);
+            if (true){
+                int bottom = Math.min(groupHeadHeight,view.getBottom() - top);
+                c.drawRect(left,top,right,top+bottom,headPaint);
+                c.drawText(starAdapter.getGroupName(position),left+10,top + bottom - groupHeadHeight/2+10,mPaint);
+
+            }else{
+                c.drawRect(left,top,right,top+groupHeadHeight,headPaint);
+                c.drawText(starAdapter.getGroupName(position),left+10,top+groupHeadHeight/2+10,mPaint);
+            }
+        }
+    }
+
+    @Override
+    public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
+        super.getItemOffsets(outRect, view, parent, state);
+        if(parent.getAdapter() instanceof SongListAdapter){
+            SongListAdapter starAdapter = (SongListAdapter) parent.getAdapter();
+            int position = parent.getChildLayoutPosition(view);
+            boolean isGroupHead = starAdapter.isGroupHead(position+1);
+            if(true){
+                outRect.set(0,groupHeadHeight,0,0);
+            }else {
+                outRect.set(0,2,0,0);
+            }
+        }
+
+    }
+    private int dp2px(Context context,float dpValue){
+        float scale = context.getResources().getDisplayMetrics().density;
+        return (int) (dpValue *scale * 0.5f);
+    }
+}
+

+ 37 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/TextViewPager.java

@@ -0,0 +1,37 @@
+package com.example.cloudmusic.adapter;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentPagerAdapter;
+
+import com.example.cloudmusic.fragment.SongListFragment;
+import com.example.cloudmusic.textNewUI.Text10087;
+
+public class TextViewPager extends FragmentPagerAdapter {
+    public TextViewPager(@NonNull FragmentManager fm) {
+        super(fm);
+    }
+
+    @NonNull
+    @Override
+    public Fragment getItem(int position) {
+        return new Text10087();
+    }
+
+    @Override
+    public int getCount() {
+        return 2;
+    }
+
+    @Nullable
+    @Override
+    public CharSequence getPageTitle(int position) {
+        if (position == 0){
+            return "第一页我giao";
+        }else{
+            return "第二页我giao";
+        }
+    }
+}

+ 53 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/adapter/ViewPagerAdapter.java

@@ -0,0 +1,53 @@
+package com.example.cloudmusic.adapter;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentPagerAdapter;
+
+import com.example.cloudmusic.fragment.BoardFragment;
+import com.example.cloudmusic.fragment.DongTaiFragment;
+import com.example.cloudmusic.fragment.MusicFragment;
+
+public class ViewPagerAdapter extends FragmentPagerAdapter {
+    private ViewPagerAdapter adapter;
+//    public ViewPagerAdapter getAdapter(){
+//        if (adapter != null){
+//
+//        }
+//    }
+    public ViewPagerAdapter(@NonNull FragmentManager fm) {
+        super(fm);
+    }
+
+    @NonNull
+    @Override
+    public Fragment getItem(int position) {
+        if (position == 0){
+            return new MusicFragment();
+        }else if(position == 1){
+            return new BoardFragment();
+        }else{
+            return new DongTaiFragment();
+        }
+    }
+
+    @Override
+    public int getCount() {
+        return 3;
+    }
+
+
+    @Nullable
+    @Override
+    public CharSequence getPageTitle(int position) {
+        if (position == 0){
+            return "音乐";
+        }else if(position == 1){
+            return "播客";
+        }else{
+            return "动态";
+        }
+    }
+}

+ 190 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/been/ListBeen.java

@@ -0,0 +1,190 @@
+package com.example.cloudmusic.been;
+
+import androidx.annotation.NonNull;
+
+import java.util.List;
+
+public class ListBeen {
+    String shareCount; // 分享数量
+    String commentCount; // 评论数量
+    String subscribedCount; // 收藏数量
+    String name;
+    String description; // 音乐介绍
+    String trackCount; // 歌曲数量
+    String imgURL;
+    List<Song> songList;
+
+    public List<Song> getSongList() {
+        return songList;
+    }
+
+    public void setSongList(List<Song> songList) {
+        this.songList = songList;
+    }
+
+    public static class Song {
+        String songNumber;
+        String songName; //歌曲名称
+        String authorName; // 作者名称
+        String ListName; // 歌曲所属
+        boolean isMv = false;
+        boolean isVip = false;
+        String id;
+        String songListName;
+        String dt;
+        String songImg;
+
+        public String getSongImg() {
+            return songImg;
+        }
+
+        public void setSongImg(String songImg) {
+            this.songImg = songImg;
+        }
+
+        public String getDt() {
+            return dt;
+        }
+
+        public void setDt(String dt) {
+            this.dt = dt;
+        }
+
+        public String getSongListName() {
+            return songListName;
+        }
+
+        public void setSongListName(String songListName) {
+            this.songListName = songListName;
+        }
+
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        public boolean isMv() {
+            return isMv;
+        }
+
+        public void setMv(boolean mv) {
+            isMv = mv;
+        }
+
+        public boolean isVip() {
+            return isVip;
+        }
+
+        public void setVip(boolean vip) {
+            isVip = vip;
+        }
+
+        @NonNull
+        @Override
+        public String toString() {
+            return "Song{" +
+                    "songNumber='" + songNumber + '\'' +
+                    ", songName='" + songName + '\'' +
+                    ", authorName='" + authorName + '\'' +
+                    ", ListName='" + ListName + '\'' +
+                    '}';
+        }
+
+        public Song() {
+        }
+
+        public String getSongNumber() {
+            return songNumber;
+        }
+
+        public void setSongNumber(String songNumber) {
+            this.songNumber = songNumber;
+        }
+
+        public String getSongName() {
+            return songName;
+        }
+
+        public void setSongName(String songName) {
+            this.songName = songName;
+        }
+
+        public String getAuthorName() {
+            return authorName;
+        }
+
+        public void setAuthorName(String authorName) {
+            this.authorName = authorName;
+        }
+
+        public String getListName() {
+            return ListName;
+        }
+
+        public void setListName(String listName) {
+            ListName = listName;
+        }
+    }
+
+    public String getImgURL() {
+        return imgURL;
+    }
+
+    public void setImgURL(String imgURL) {
+        this.imgURL = imgURL;
+    }
+
+    public ListBeen() {
+    }
+
+    public String getShareCount() {
+        return shareCount;
+    }
+
+    public void setShareCount(String shareCount) {
+        this.shareCount = shareCount;
+    }
+
+    public String getCommentCount() {
+        return commentCount;
+    }
+
+    public void setCommentCount(String commentCount) {
+        this.commentCount = commentCount;
+    }
+
+    public String getSubscribedCount() {
+        return subscribedCount;
+    }
+
+    public void setSubscribedCount(String subscribedCount) {
+        this.subscribedCount = subscribedCount;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getTrackCount() {
+        return trackCount;
+    }
+
+    public void setTrackCount(String trackCount) {
+        this.trackCount = trackCount;
+    }
+}

+ 79 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/been/MineBeen.java

@@ -0,0 +1,79 @@
+package com.example.cloudmusic.been;
+
+public class MineBeen {
+    String name;
+    String peopleImg;
+    String backgroundImg;
+    String id;
+    String follows; // 关注
+    String followeds; // 粉丝
+    String level;
+
+    public String getFollows() {
+        return follows;
+    }
+
+    public void setFollows(String follows) {
+        this.follows = follows;
+    }
+
+    public String getFolloweds() {
+        return followeds;
+    }
+
+    public void setFolloweds(String followeds) {
+        this.followeds = followeds;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @Override
+    public String toString() {
+        return "MineBeen{" +
+                "name='" + name + '\'' +
+                ", peopleImg='" + peopleImg + '\'' +
+                ", backgroundImg='" + backgroundImg + '\'' +
+                '}';
+    }
+
+    public MineBeen() {
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPeopleImg() {
+        return peopleImg;
+    }
+
+    public void setPeopleImg(String peopleImg) {
+        this.peopleImg = peopleImg;
+    }
+
+    public String getBackgroundImg() {
+        return backgroundImg;
+    }
+
+    public void setBackgroundImg(String backgroundImg) {
+        this.backgroundImg = backgroundImg;
+    }
+}

+ 76 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/been/MineMusicListBeen.java

@@ -0,0 +1,76 @@
+package com.example.cloudmusic.been;
+
+import androidx.annotation.NonNull;
+
+public class MineMusicListBeen {
+    String count;
+    String coverImgUrl;
+    String listId;
+    String author;
+    String authorId;
+    String name;
+
+    public MineMusicListBeen() {
+    }
+
+    @NonNull
+    @Override
+    public String toString() {
+        return "MineMusicListBeen{" +
+                "count='" + count + '\'' +
+                ", coverImgUrl='" + coverImgUrl + '\'' +
+                ", listId='" + listId + '\'' +
+                ", author='" + author + '\'' +
+                ", authorId='" + authorId + '\'' +
+                ", name='" + name + '\'' +
+                '}';
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCount() {
+        return count;
+    }
+
+    public void setCount(String count) {
+        this.count = count;
+    }
+
+    public String getCoverImgUrl() {
+        return coverImgUrl;
+    }
+
+    public void setCoverImgUrl(String coverImgUrl) {
+        this.coverImgUrl = coverImgUrl;
+    }
+
+    public String getListId() {
+        return listId;
+    }
+
+    public void setListId(String listId) {
+        this.listId = listId;
+    }
+
+    public String getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+
+    public String getAuthorId() {
+        return authorId;
+    }
+
+    public void setAuthorId(String authorId) {
+        this.authorId = authorId;
+    }
+}

+ 69 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/been/SongListBeen.java

@@ -0,0 +1,69 @@
+package com.example.cloudmusic.been;
+
+public class SongListBeen {
+    String name;
+    String picUr;
+    String id;
+    String playCount; // 播放次数
+    String trackCount; // 歌曲数量
+
+    public String getTrackCount() {
+        return trackCount;
+    }
+
+    public void setTrackCount(String trackCount) {
+        this.trackCount = trackCount;
+    }
+
+    @Override
+    public String toString() {
+        return "SongListBeen{" +
+                "name='" + name + '\'' +
+                ", picUr='" + picUr + '\'' +
+                ", id='" + id + '\'' +
+                ", playCount='" + playCount + '\'' +
+                '}';
+    }
+
+    public SongListBeen() {
+    }
+
+    public SongListBeen(String name, String picUr, String id, String playCount) {
+        this.name = name;
+        this.picUr = picUr;
+        this.id = id;
+        this.playCount = playCount;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPicUr() {
+        return picUr;
+    }
+
+    public void setPicUr(String picUr) {
+        this.picUr = picUr;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPlayCount() {
+        return playCount;
+    }
+
+    public void setPlayCount(String playCount) {
+        this.playCount = playCount;
+    }
+}

+ 27 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/BoardFragment.java

@@ -0,0 +1,27 @@
+package com.example.cloudmusic.fragment;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.example.cloudmusic.R;
+
+public class BoardFragment extends Fragment {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+
+        return inflater.inflate(R.layout.fragment_borad, container, false);
+    }
+}

+ 24 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/DongTaiFragment.java

@@ -0,0 +1,24 @@
+package com.example.cloudmusic.fragment;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.example.cloudmusic.R;
+
+public class DongTaiFragment extends Fragment {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_dong_tai, container, false);
+    }
+}

+ 48 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/HorizonScrollFragment.java

@@ -0,0 +1,48 @@
+package com.example.cloudmusic.fragment;
+
+import android.os.Bundle;
+
+import androidx.cardview.widget.CardView;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.example.cloudmusic.R;
+
+public class HorizonScrollFragment extends Fragment {
+
+    private View root;
+    private CardView background;
+    private RecyclerView recyclerView;
+    private TextView product;
+    private TextView number;
+    private TextView title;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        root = inflater.inflate(R.layout.fragment_horizon_srcoll, container, false);
+        initUI();
+        return root;
+    }
+
+    private void initUI() {
+        background = root.findViewById(R.id.horizon_item);
+        recyclerView = root.findViewById(R.id.horizon_recycler);
+        product = root.findViewById(R.id.sing_product);
+        number = root.findViewById(R.id.people_number);
+        title = root.findViewById(R.id.horizon_title);
+
+
+    }
+}

+ 29 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/ManYouFragment.java

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

+ 178 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/MineFragment.java

@@ -0,0 +1,178 @@
+package com.example.cloudmusic.fragment;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.ViewPager;
+
+import com.bumptech.glide.Glide;
+import com.example.cloudmusic.been.MineBeen;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.adapter.ViewPagerAdapter;
+import com.example.cloudmusic.utils.OkHttpUtil;
+import com.google.android.material.tabs.TabLayout;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+public class MineFragment extends Fragment {
+
+    private OkHttpUtil util;
+    private View root;
+    private TextView login;
+    private ImageView title;
+    private MineBeen been;
+    private Handler mHandler;
+    private SharedPreferences sp;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Inflate the layout for this fragment
+        root = inflater.inflate(R.layout.fragment_mine, container, false);
+        sp = getActivity().getPreferences(Context.MODE_PRIVATE);
+        initUI();
+        initLogin();
+
+        ViewPager viewPager = root.findViewById(R.id.mine_vp);
+        ViewPagerAdapter adapter = new ViewPagerAdapter(getActivity().getSupportFragmentManager());
+        TabLayout tabs = root.findViewById(R.id.tabs);
+        tabs.setupWithViewPager(viewPager);
+        viewPager.setAdapter(adapter);
+        return root;
+    }
+
+    @SuppressLint("HandlerLeak")
+    private void initUI() {
+        login = root.findViewById(R.id.mine_login);
+        TextView login_no = root.findViewById(R.id.mine_login_no);
+        title = root.findViewById(R.id.mine_title_no);
+        TextView follows = root.findViewById(R.id.mine_follow);
+        TextView followeds = root.findViewById(R.id.mine_followeds);
+        TextView level = root.findViewById(R.id.mine_level);
+        login.setOnClickListener(v -> {
+
+        });
+
+        mHandler = new Handler() {
+            @SuppressLint("SetTextI18n")
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what) {
+                    case 1:
+                        been = (MineBeen) msg.obj;
+                        been.toString();
+                        login.setText(been.getName());
+                        Glide.with(root)
+                                .load(been.getPeopleImg())
+                                .placeholder(R.drawable.cloudmusic_white)
+                                .error(R.drawable.cloudmusic_white)
+                                .into(title);
+                        initData();
+                        break;
+                    case 2:
+                        follows.setText(been.getFollows() + " 关注");
+                        followeds.setText(been.getFolloweds() + " 粉丝");
+                        level.setText("Lv." + been.getLevel() + " 等级");
+
+                }
+            }
+        };
+    }
+
+    private void initLogin() {
+        util = new OkHttpUtil();
+        util.sendGetRequest("http://192.168.86.158:3000/login/cellphone?phone=19138688251&password=12345678i", new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                //   Toast.makeText(root.getContext(), "登录成功", Toast.LENGTH_SHORT).show();
+                try {
+                    String string = response.body().string();
+                    JSONObject object = new JSONObject(string);
+                    JSONObject account = object.optJSONObject("profile");
+                    MineBeen been = new MineBeen();
+                    if (account != null) {
+                        String peopleImg = account.optString("avatarUrl");
+                        String backgroundImg = account.optString("backgroundUrl");
+                        String name = account.optString("nickname");
+                        String id = account.optString("userId");
+                        been.setBackgroundImg(backgroundImg);
+                        been.setPeopleImg(peopleImg);
+                        been.setName(name);
+                        been.setId(id);
+                        SharedPreferences.Editor edit = sp.edit();
+                        edit.putString("userId", id);
+                        edit.apply();
+                        Message msg = new Message();
+                        msg.what = 1;
+                        msg.obj = been;
+                        mHandler.sendMessage(msg);
+                    }
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+
+    private void initData() {
+        util.sendGetRequest("http://192.168.86.158:3000/user/detail?uid=" + been.getId(), new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String body = response.body().string();
+                    JSONObject object = new JSONObject(body);
+                    String level = object.optString("level");
+                    JSONObject json = object.optJSONObject("profile");
+                    String follows = json.optString("follows");
+                    String followeds = json.optString("followeds");
+                    been.setFollows(follows);
+                    been.setFolloweds(followeds);
+                    been.setLevel(level);
+                    Message msg = new Message();
+                    msg.what = 2;
+                    mHandler.sendMessage(msg);
+
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+                System.out.println("失败了");
+            }
+        });
+    }
+
+
+}

+ 136 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/MusicFragment.java

@@ -0,0 +1,136 @@
+package com.example.cloudmusic.fragment;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.os.Handler;
+import android.os.Message;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.example.cloudmusic.been.MineMusicListBeen;
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.adapter.MusicAdapter;
+import com.example.cloudmusic.utils.OkHttpUtil;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import okhttp3.Call;
+import okhttp3.Response;
+
+
+public class MusicFragment extends Fragment {
+
+
+    private String id;
+    private Handler mHandler;
+    private View root;
+    private List<MineMusicListBeen> list;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    public void onStart() {
+        super.onStart();
+        initData();
+        initUI();
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        root = inflater.inflate(R.layout.fragment_music, container, false);
+        SharedPreferences sp = getActivity().getPreferences(Context.MODE_PRIVATE);
+        id = sp.getString("userId", "null");
+        list = new ArrayList<>();
+        return root;
+    }
+
+    @SuppressLint("HandlerLeak")
+    private void initUI() {
+        RecyclerView recycler = root.findViewById(R.id.music_recycler);
+        MusicAdapter adapter = new MusicAdapter(list, root.getContext());
+        LinearLayoutManager manager = new LinearLayoutManager(root.getContext());
+        recycler.setAdapter(adapter);
+        recycler.setLayoutManager(manager);
+
+        mHandler = new Handler() {
+            @Override
+            public void handleMessage(@NonNull Message msg) {
+                super.handleMessage(msg);
+                switch (msg.what) {
+                    case 1:
+                        list.clear();
+                        list.addAll((Collection<? extends MineMusicListBeen>) msg.obj);
+                        adapter.notifyDataSetChanged();
+                        break;
+                }
+            }
+        };
+    }
+
+    private void initData() {
+        OkHttpUtil util = new OkHttpUtil();
+        System.out.println(id);
+        util.sendGetRequest("http://192.168.86.158:3000/user/playlist?uid=" + id, new OkHttpUtil.OkhttpInterface() {
+            @Override
+            public void success(Call call, Response response) {
+                try {
+                    String string = response.body().string();
+                    JSONObject object = new JSONObject(string);
+                    JSONArray result = object.optJSONArray("playlist");
+                    List<MineMusicListBeen> list = new ArrayList<>();
+                    for (int i = 0; i < result.length(); i++) {
+                        MineMusicListBeen been = new MineMusicListBeen();
+                        JSONObject json = (JSONObject) result.get(i);
+                        String name = json.optString("name");
+                        String songNumber = json.optString("trackCount");
+                        String coverImgUrl = json.optString("coverImgUrl");
+                        String songListId = json.optString("id");
+                        JSONObject creator = json.optJSONObject("creator");
+                        String author = creator.optString("nickname");
+                        String authorId = creator.optString("userId");
+                        been.setAuthor(author);
+                        been.setAuthorId(authorId);
+                        been.setName(name);
+                        been.setCount(songNumber);
+                        been.setCoverImgUrl(coverImgUrl);
+                        been.setListId(songListId);
+                        list.add(been);
+                    }
+
+                    Message msg = new Message();
+                    msg.what = 1;
+                    msg.obj = list;
+                    mHandler.sendMessage(msg);
+                } catch (IOException | JSONException e) {
+                    e.printStackTrace();
+                }
+
+            }
+
+            @Override
+            public void failure(Call call, IOException e) {
+
+            }
+        });
+    }
+}

+ 29 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/fragment/SongListFragment.java

@@ -0,0 +1,29 @@
+package com.example.cloudmusic.fragment;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.example.cloudmusic.R;
+
+
+public class SongListFragment extends Fragment {
+
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_song_list, container, false);
+    }
+
+}

+ 142 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Demo1.java

@@ -0,0 +1,142 @@
+package com.example.cloudmusic.textNewUI;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.util.AttributeSet;
+import android.view.View;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Demo1 extends View {
+
+
+    private Paint linePaint; // 画线的画笔
+    private Paint pointPaint; // 画点的画笔
+    private Paint textPaint; // 画文字的画笔
+    private List<Float> dataPoints; // 数据点的列表
+    private int lastRise;
+
+    public Demo1(Context context) {
+        super(context);
+        init(); // 调用初始化方法
+    }
+
+    public Demo1(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(); // 调用初始化方法
+    }
+
+    public Demo1(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init(); // 调用初始化方法
+    }
+
+    private void init() {
+        linePaint = new Paint(); // 初始化画线的画笔
+        //0 145 244
+        int lineColor = Color.rgb(239, 161, 51);
+        linePaint.setColor(lineColor); // 设置画笔颜色为蓝色
+        linePaint.setStrokeWidth(5); // 设置画笔宽度为5
+        linePaint.setAntiAlias(true); // 设置抗锯齿
+
+        pointPaint = new Paint(); // 初始化画点的画笔
+        pointPaint.setColor(lineColor); // 设置画笔颜色为红色
+        pointPaint.setStrokeWidth(10); // 设置画笔宽度为10
+        pointPaint.setAntiAlias(true); // 设置抗锯齿
+
+        textPaint = new Paint(); // 初始化画文字的画笔
+        int textColor = Color.rgb(0, 0, 0);
+        textPaint.setColor(textColor); // 设置画笔颜色为黑色
+        textPaint.setTextSize(24); // 设置文字大小为30
+        textPaint.setAntiAlias(true); // 设置抗锯齿
+
+        dataPoints = new ArrayList<>(); // 初始化数据点的列表
+    }
+
+    public void setDataPoints(List<Float> dataPoints) {
+        this.dataPoints = dataPoints; // 设置数据点列表
+        invalidate(); // 重新绘制视图
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+
+        if (dataPoints == null || dataPoints.size() < 2) {
+            return; // 如果没有数据或者数据点少于2个,不绘制
+        }
+
+        float width = getWidth(); // 获取视图宽度
+        float height = getHeight(); // 获取视图高度
+        float maxDataPoint = getMaxDataPoint(); // 获取数据点的最大值
+        float minDataPoint = getMinDataPoint(); // 获取数据点的最小值
+        float padding = 24;
+        float xInterval = (width - padding * 3) / (dataPoints.size() - 1); // 计算X轴上每个点的间隔
+        float yScale = (height - padding * 4) / (maxDataPoint - minDataPoint); // 计算Y轴上的比例
+        lastRise = -1;
+        float startY = 0;
+
+        for (int i = 0; i < dataPoints.size() - 1; i++) {
+            float startX = i * xInterval + padding; // 计算起点的X坐标
+            startY = height - (dataPoints.get(i) - minDataPoint) * yScale - padding * 2; // 计算起点的Y坐标
+            float stopX = (i + 1) * xInterval + padding; // 计算终点的X坐标
+            float stopY = height - (dataPoints.get(i + 1) - minDataPoint) * yScale - padding * 2; // 计算终点的Y坐标
+            canvas.drawLine(startX, startY, stopX, stopY, linePaint); // 绘制线段
+            canvas.drawCircle(startX, startY, 5, pointPaint); // 绘制起点的圆点
+            drawText(canvas, startX, startY, stopY, i);
+        }
+
+        // 绘制最后一个点和其数据值
+        float lastX = (dataPoints.size() - 1) * xInterval + padding; // 计算最后一个点的X坐标
+        float lastY = height - (dataPoints.get(dataPoints.size() - 1) - minDataPoint) * yScale - padding * 2; // 计算最后一个点的Y坐标
+        canvas.drawCircle(lastX, lastY, 5, pointPaint); // 绘制最后一个点的圆点
+        drawText(canvas, lastX, lastY, startY, dataPoints.size() - 1);// 在最后一个点上方绘制数据值和单位
+    }
+
+    private void drawText(Canvas canvas, float startX, float startY, float stopY, int i) {
+        //如果是降
+        long a = (long) ((double) dataPoints.get(i));
+        String text = a + "°";
+        if (startY < stopY) {
+            if (lastRise == 0) {//如果是降
+                canvas.drawText(text, startX, startY - 12, textPaint);
+            } else {
+                canvas.drawText(text, startX - 24, startY - 12, textPaint);
+            }
+            lastRise = 0;
+        } else if (startY > stopY) {//如果是升
+            if (lastRise == 1) {
+                canvas.drawText(text, startX - 48, startY - 12, textPaint);
+            } else {
+                canvas.drawText(text, startX - 24, startY + 24, textPaint);
+            }
+            lastRise = 1;
+        } else {
+            canvas.drawText(text, startX, startY - 12, textPaint);
+        }
+    }
+
+    private float getMaxDataPoint() {
+        float max = 0;
+        for (float point : dataPoints) {
+            if (point > max) {
+                max = point; // 找到数据点中的最大值
+            }
+        }
+        return max; // 返回最大值
+    }
+
+    private float getMinDataPoint() {
+        float min = 0;
+        for (float point : dataPoints) {
+            if (point < min) {
+                min = point; // 找到数据点中的最小值
+            }
+        }
+        return min; // 返回最小值
+    }
+}
+

+ 102 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Jive.java

@@ -0,0 +1,102 @@
+package com.example.cloudmusic.textNewUI;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.Nullable;
+
+import com.example.cloudmusic.R;
+
+public class Jive extends LinearLayout {
+
+    private Button leftBtn;
+    private Button rightBtn;
+    private TextView titleTv;
+    private String titleText;
+    private float titleTextSize;
+    private int titleTextColor;
+    private String leftText;
+    private float leftTextSize;
+    private int leftTextColor;
+    private Drawable leftBackground;
+    private String rightText;
+    private float rightTextSize;
+    private int rightTextColor;
+    private Drawable rightBackground;
+
+    public Jive(Context context) {
+        super(context);
+    }
+
+    public Jive(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        initAttrs(context.obtainStyledAttributes(attrs,R.styleable.TopBar));
+        View view = LayoutInflater.from(context).inflate(R.layout.text2, this);
+        leftBtn = view.findViewById(R.id.left_btn);
+        rightBtn = view.findViewById(R.id.right_btn);
+        titleTv = view.findViewById(R.id.title_tv);
+
+        titleTv.setText(titleText);
+        titleTv.setTextSize(titleTextSize);
+        titleTv.setTextColor(titleTextColor);
+        //设置左边按钮属性
+        leftBtn.setText(leftText);
+        leftBtn.setTextSize(leftTextSize);
+        leftBtn.setTextColor(leftTextColor);
+        leftBtn.setBackgroundDrawable(leftBackground);
+        //设置右边按钮属性
+        rightBtn.setText(rightText);
+        rightBtn.setTextSize(rightTextSize);
+        rightBtn.setTextColor(rightTextColor);
+        rightBtn.setBackgroundDrawable(rightBackground);
+        //左右按钮点击事件
+        leftBtn.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                onTopBarClickListener.leftClick();
+            }
+        });
+        rightBtn.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                onTopBarClickListener.rightClick();
+            }
+        });
+    }
+
+    onTopBarClickListener onTopBarClickListener = null;
+
+    public void setOnTopBarClickListener(onTopBarClickListener onTopBarClickListener) {
+        this.onTopBarClickListener = onTopBarClickListener;
+    }
+
+    private void initAttrs(TypedArray ta) {
+        titleText = ta.getString(R.styleable.TopBar_titleText);
+        titleTextSize = ta.getDimension(R.styleable.TopBar_titleTextSize, 25);
+        titleTextColor = ta.getColor(R.styleable.TopBar_titleTextColor, 0);
+
+        leftText = ta.getString(R.styleable.TopBar_leftText);
+        leftTextSize = ta.getDimension(R.styleable.TopBar_leftTextSize, 16);
+        leftTextColor = ta.getColor(R.styleable.TopBar_leftTextColor, 0);
+        leftBackground = ta.getDrawable(R.styleable.TopBar_leftBackground);
+
+        rightText = ta.getString(R.styleable.TopBar_rightText);
+        rightTextSize = ta.getDimension(R.styleable.TopBar_rightTextSize, 16);
+        rightTextColor = ta.getColor(R.styleable.TopBar_rightTextColor, 0);
+        rightBackground = ta.getDrawable(R.styleable.TopBar_rightBackground);
+
+        ta.recycle();
+    }
+
+    public interface onTopBarClickListener{
+        void leftClick();
+        void rightClick();
+    }
+}

+ 25 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10086.java

@@ -0,0 +1,25 @@
+package com.example.cloudmusic.textNewUI;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.viewpager.widget.ViewPager;
+
+import android.os.Bundle;
+import android.view.View;
+
+import com.example.cloudmusic.R;
+import com.example.cloudmusic.adapter.TextViewPager;
+import com.google.android.material.tabs.TabLayout;
+
+public class Text10086 extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_text10086);
+        ViewPager viewPager = findViewById(R.id.text_vp);
+        TabLayout tabla = findViewById(R.id.text_ty);
+        viewPager.setAdapter(new TextViewPager(getSupportFragmentManager()));
+        tabla.setupWithViewPager(viewPager);
+    }
+
+}

+ 70 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10087.java

@@ -0,0 +1,70 @@
+package com.example.cloudmusic.textNewUI;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+import com.example.cloudmusic.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Text10087 extends Fragment {
+
+
+    private RecyclerView recyclerView;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        View root = inflater.inflate(R.layout.fragment_text10087, container, false);
+        recyclerView = root.findViewById(R.id.text_rcv);
+        Text10088 adapter = new Text10088(initData(), root.getContext());
+        recyclerView.setAdapter(adapter);
+        LinearLayoutManager manager = new LinearLayoutManager(root.getContext());
+        recyclerView.setLayoutManager(manager);
+
+        return root;
+    }
+//    public void resetHeight(RecyclerView listview) {
+//        RecyclerView.Adapter listAdapter = listview.getAdapter();
+//        if (listAdapter == null) {
+//            return;
+//        }
+//
+//        int totalHeight = 0;
+
+
+//        ViewGroup.LayoutParams params = listview.getLayoutParams();
+//        for (int i = 0; i < listAdapter.getItemCount(); i++) {
+//            View listItem = listAdapter.onCreateViewHolder(n,i);
+//            listItem.measure(0, 0);
+//            totalHeight += listItem.getMeasuredHeight();
+//        }
+//        params.height = totalHeight + (listview.getDividerHeight() * (listAdapter.getCount() - 1));
+//        listview.setLayoutParams(params);
+//        ((Text10086) getActivity()).setVpLp(params.height);
+//    }
+
+    private List<String> initData() {
+        List<String> list = new ArrayList<>();
+        for (int i = 0; i < 100; i++) {
+            list.add("我的天哪");
+        }
+        System.out.println(list.size());
+        return list;
+    }
+}

+ 56 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/Text10088.java

@@ -0,0 +1,56 @@
+package com.example.cloudmusic.textNewUI;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.cloudmusic.R;
+
+import java.util.List;
+
+public class Text10088 extends RecyclerView.Adapter<Text10088.InnerHolder> {
+
+    private final List<String> mList;
+    private final Context mContext;
+
+    public Text10088(List<String> list, Context context) {
+        System.out.println(list);
+        mList = list;
+        mContext = context;
+    }
+
+    @NonNull
+    @Override
+    public Text10088.InnerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new InnerHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.text_item,parent,false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull Text10088.InnerHolder holder, int position) {
+        holder.setData(mList.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        return mList.size();
+    }
+
+    public class InnerHolder extends RecyclerView.ViewHolder {
+
+        private final TextView v;
+
+        public InnerHolder(@NonNull View itemView) {
+            super(itemView);
+            v = itemView.findViewById(R.id.text_content);
+        }
+
+        public void setData(String s) {
+            v.setText(s);
+        }
+    }
+}

+ 61 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/textNewUI/ToastActivity.java

@@ -0,0 +1,61 @@
+package com.example.cloudmusic.textNewUI;
+
+import static android.app.ProgressDialog.show;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.app.ProgressDialog;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.view.View;
+import android.widget.Button;
+
+import com.example.cloudmusic.R;
+
+public class ToastActivity extends AppCompatActivity {
+
+    private Button on;
+    private int number = 0;
+    private ProgressDialog progressDialog;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_toast);
+
+        on = findViewById(R.id.btn_on);
+        on.setOnClickListener(v -> {
+             show();
+             showProgress();
+        });
+    }
+
+    private void showProgress() {
+        Handler handler = new Handler(Looper.getMainLooper());
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                while(number <= 100){
+                    number++;
+                    handler.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            progressDialog.setProgress(number);
+                        }
+                    });
+                }
+                number = 0;
+            }
+        });
+    }
+
+    private void show() {
+        progressDialog = new ProgressDialog(this);
+        progressDialog.setMax(100);
+        progressDialog.setProgress(0);
+        progressDialog.setTitle("请稍等");
+        progressDialog.setMessage("当前上传进度");
+    }
+
+}

+ 51 - 0
CloudMusic2/app/src/main/java/com/example/cloudmusic/utils/OkHttpUtil.java

@@ -0,0 +1,51 @@
+package com.example.cloudmusic.utils;
+
+import androidx.annotation.NonNull;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+
+public class OkHttpUtil {
+
+    private final OkHttpClient client;
+    private static OkHttpUtil util;
+
+    public OkHttpUtil(){
+        OkHttpClient.Builder builder = new OkHttpClient.Builder();
+        builder.connectTimeout(20,TimeUnit.SECONDS)
+                .readTimeout(60, TimeUnit.SECONDS)
+                .writeTimeout(60, TimeUnit.SECONDS);
+        client = builder.build();
+    }
+    public static OkHttpUtil getInstance(){
+//        synchronized (OkHttpUtil.class) {
+//            util = new OkHttpUtil();
+//        }
+        return new OkHttpUtil();
+    }
+    public void sendGetRequest(String url,OkhttpInterface okhttpInterface){
+        Request request = new Request.Builder().url(url).build();
+        client.newCall(request).enqueue(new Callback() {
+            @Override
+            public void onFailure(@NonNull Call call, @NonNull IOException e) {
+                okhttpInterface.failure(call, e);
+            }
+
+            @Override
+            public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
+                okhttpInterface.success(call, response);
+            }
+        });
+    }
+
+    public interface OkhttpInterface{
+        void success(Call call,Response response);
+        void failure(Call call,IOException e);
+    }
+}

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/aixin.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/beforesong.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/bofang.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable-v24/btn_text_red.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/down_jian_tou.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/fenxiang.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/fenxxiang.png


+ 30 - 0
CloudMusic2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/more2.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/nextsong.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/pause.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/pinlun.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable-v24/player_img_shape.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/player_pinlun.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable-v24/player_vip_shape.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/shoucang.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/shoucang_red.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable-v24/song_list_vip_shape.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="5dp"/>
+    <stroke android:color="#FF231C" android:width="2dp"/>
+</shape>

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/text.jpg


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable-v24/xunhuan.png


+ 10 - 0
CloudMusic2/app/src/main/res/drawable/a123.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:height="26dp" android:width="26dp">
+        <shape android:shape="oval">
+            <solid android:color="#F83025"/>
+        </shape>
+    </item>
+<item android:drawable="@drawable/find_white" android:height="22dp" android:width="22dp"
+    android:gravity="center"/>
+</layer-list>

+ 10 - 0
CloudMusic2/app/src/main/res/drawable/a2.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+<item android:width="26dp" android:height="26dp">
+    <shape android:shape="oval">
+        <solid android:color="#F83025"/>
+    </shape>
+</item >
+    <item android:bottom="5dp" android:gravity="center"
+        android:height="22dp" android:width="22dp" android:drawable="@drawable/mine_white"/>
+</layer-list>

+ 5 - 0
CloudMusic2/app/src/main/res/drawable/btn_text_white.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/cloudmusic_gray.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/cloudmusic_white.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/ear_ji.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/er_ji2.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable/find_checked_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_checked="false" android:drawable="@drawable/find_gray"/>
+    <item android:state_checked="true" android:drawable="@drawable/a123" />
+</selector>

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/find_gray.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/find_white.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/firstpage.jpg


+ 7 - 0
CloudMusic2/app/src/main/res/drawable/ic_baseline_density_medium_24.xml

@@ -0,0 +1,7 @@
+<vector android:height="24dp" android:tint="#000000"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M3,3h18v2h-18z"/>
+    <path android:fillColor="@android:color/white" android:pathData="M3,19h18v2h-18z"/>
+    <path android:fillColor="@android:color/white" android:pathData="M3,11h18v2h-18z"/>
+</vector>

+ 5 - 0
CloudMusic2/app/src/main/res/drawable/ic_baseline_mic_none_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#000000"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM10.8,4.9c0,-0.66 0.54,-1.2 1.2,-1.2 0.66,0 1.2,0.54 1.2,1.2l-0.01,6.2c0,0.66 -0.53,1.2 -1.19,1.2 -0.66,0 -1.2,-0.54 -1.2,-1.2L10.8,4.9zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"/>
+</vector>

+ 5 - 0
CloudMusic2/app/src/main/res/drawable/ic_baseline_play_arrow_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="30dp" android:tint="#FFFFFF"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M8,5v14l11,-7z"/>
+</vector>

+ 170 - 0
CloudMusic2/app/src/main/res/drawable/ic_launcher_background.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/leftback.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable/mine_checked_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_checked="false" android:drawable="@drawable/mine_gray"/>
+    <item android:state_checked="true" android:drawable="@drawable/a2" />
+</selector>

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/mine_gray.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable/mine_selector_shape.xml

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

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/mine_white.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/more.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/more_big_white.png


+ 5 - 0
CloudMusic2/app/src/main/res/drawable/music_checked_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_checked="false" android:drawable="@drawable/cloudmusic_gray"/>
+    <item android:state_checked="true" android:drawable="@drawable/cloudmusic_white" />
+</selector>

TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/mv.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/people.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/recent.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/saoma.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/shousuo.png


TEMPAT SAMPAH
CloudMusic2/app/src/main/res/drawable/shousuo_big_white.png


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini