From 8c4b0e17adadff6f6f251bdf7da5f1be7669e012 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 16 Nov 2020 12:42:01 +0800 Subject: [PATCH] update --- app/build.gradle | 2 ++ app/src/main/AndroidManifest.xml | 4 ++- .../yutou/nas_music_player/MyApplication.java | 11 +++++++ .../{ => views}/MainActivity.java | 4 ++- .../nas_music_player/views/OpenActivity.java | 17 +++++++++++ app/src/main/res/layout/activity_main.xml | 29 +++++++++++++------ app/src/main/res/values/strings.xml | 2 +- build.gradle | 2 +- 8 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 app/src/main/java/com/yutou/nas_music_player/MyApplication.java rename app/src/main/java/com/yutou/nas_music_player/{ => views}/MainActivity.java (78%) create mode 100644 app/src/main/java/com/yutou/nas_music_player/views/OpenActivity.java diff --git a/app/build.gradle b/app/build.gradle index 9d48ef8..bf54514 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,4 +30,6 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'jp.wasabeef:glide-transformations:4.x.x' + } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fdd8890..603a4d2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -4,18 +4,20 @@ - + + \ No newline at end of file diff --git a/app/src/main/java/com/yutou/nas_music_player/MyApplication.java b/app/src/main/java/com/yutou/nas_music_player/MyApplication.java new file mode 100644 index 0000000..71a4823 --- /dev/null +++ b/app/src/main/java/com/yutou/nas_music_player/MyApplication.java @@ -0,0 +1,11 @@ +package com.yutou.nas_music_player; + +import android.app.Application; + +public class MyApplication extends Application { + @Override + public void onCreate() { + super.onCreate(); + + } +} diff --git a/app/src/main/java/com/yutou/nas_music_player/MainActivity.java b/app/src/main/java/com/yutou/nas_music_player/views/MainActivity.java similarity index 78% rename from app/src/main/java/com/yutou/nas_music_player/MainActivity.java rename to app/src/main/java/com/yutou/nas_music_player/views/MainActivity.java index 7348f78..b6583d8 100644 --- a/app/src/main/java/com/yutou/nas_music_player/MainActivity.java +++ b/app/src/main/java/com/yutou/nas_music_player/views/MainActivity.java @@ -1,9 +1,11 @@ -package com.yutou.nas_music_player; +package com.yutou.nas_music_player.views; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; +import com.yutou.nas_music_player.R; + public class MainActivity extends AppCompatActivity { @Override diff --git a/app/src/main/java/com/yutou/nas_music_player/views/OpenActivity.java b/app/src/main/java/com/yutou/nas_music_player/views/OpenActivity.java new file mode 100644 index 0000000..85cc8cf --- /dev/null +++ b/app/src/main/java/com/yutou/nas_music_player/views/OpenActivity.java @@ -0,0 +1,17 @@ +package com.yutou.nas_music_player.views; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +public class OpenActivity extends AppCompatActivity { + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Intent intent=new Intent(this,MainActivity.class); + startActivity(intent); + finish(); + } +} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 4fc2444..d6ec7e9 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -4,15 +4,26 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".views.MainActivity"> - + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 570d404..3c8b227 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - nas-music-player + 私人播放器 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 6754c23..53524a2 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.0.1" + classpath 'com.android.tools.build:gradle:4.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files