From 73624a236440eb94153307c5c29dc0b8c15b196f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E9=9C=B2?= <2983604867@qq.com>
Date: Tue, 9 Nov 2021 00:02:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E9=A1=B5+=E5=BA=95=E9=83=A8?=
=?UTF-8?q?=E5=AF=BC=E8=88=AA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
MyApplication/.idea/misc.xml | 8 +-
MyApplication/app/build.gradle | 20 +-
.../app/src/main/AndroidManifest.xml | 12 +-
.../example/myapplication/MainActivity.java | 14 -
.../example/myapplication/MyApplication.java | 16 +
.../activity/LauncherActivity.java | 81 +
.../myapplication/activity/MainActivity.java | 41 +
.../myapplication/fragment/HomeFragment.java | 66 +
.../src/main/res/drawable/page_launcher.png | Bin 0 -> 19276 bytes
.../src/main/res/layout/activity_launcher.xml | 16 +
.../app/src/main/res/layout/activity_main.xml | 33 +-
.../app/src/main/res/layout/fragment_home.xml | 14 +
.../main/res/mipmap-hdpi/tab_home_normal.png | Bin 0 -> 1036 bytes
.../res/mipmap-hdpi/tab_home_selected.png | Bin 0 -> 787 bytes
.../main/res/mipmap-hdpi/tab_mine_normal.png | Bin 0 -> 1062 bytes
.../res/mipmap-hdpi/tab_mine_selected.png | Bin 0 -> 1198 bytes
.../res/mipmap-hdpi/tab_position_normal.png | Bin 0 -> 890 bytes
.../res/mipmap-hdpi/tab_position_selected.png | Bin 0 -> 1298 bytes
.../main/res/mipmap-hdpi/tab_trace_normal.png | Bin 0 -> 1106 bytes
.../res/mipmap-hdpi/tab_trace_selected.png | Bin 0 -> 1135 bytes
.../app/src/main/res/navigation/nav_graph.xml | 28 +
.../app/src/main/res/values-land/dimens.xml | 3 +
.../src/main/res/values-w1240dp/dimens.xml | 3 +
.../app/src/main/res/values-w600dp/dimens.xml | 3 +
.../app/src/main/res/values/colors.xml | 1 +
.../app/src/main/res/values/dimens.xml | 3 +
.../app/src/main/res/values/strings.xml | 11 +
.../app/src/main/res/values/themes.xml | 18 +-
MyApplication/build.gradle | 12 +-
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
MyApplication/hs_err_pid15008.log | 911 ++
MyApplication/hs_err_pid2092.log | 759 +
MyApplication/replay_pid15008.log | 13347 ++++++++++++++++
MyApplication/settings.gradle | 1 +
34 files changed, 15371 insertions(+), 52 deletions(-)
delete mode 100644 MyApplication/app/src/main/java/com/example/myapplication/MainActivity.java
create mode 100644 MyApplication/app/src/main/java/com/example/myapplication/MyApplication.java
create mode 100644 MyApplication/app/src/main/java/com/example/myapplication/activity/LauncherActivity.java
create mode 100644 MyApplication/app/src/main/java/com/example/myapplication/activity/MainActivity.java
create mode 100644 MyApplication/app/src/main/java/com/example/myapplication/fragment/HomeFragment.java
create mode 100644 MyApplication/app/src/main/res/drawable/page_launcher.png
create mode 100644 MyApplication/app/src/main/res/layout/activity_launcher.xml
create mode 100644 MyApplication/app/src/main/res/layout/fragment_home.xml
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_home_normal.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_home_selected.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_mine_normal.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_mine_selected.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_position_normal.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_position_selected.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_trace_normal.png
create mode 100644 MyApplication/app/src/main/res/mipmap-hdpi/tab_trace_selected.png
create mode 100644 MyApplication/app/src/main/res/navigation/nav_graph.xml
create mode 100644 MyApplication/app/src/main/res/values-land/dimens.xml
create mode 100644 MyApplication/app/src/main/res/values-w1240dp/dimens.xml
create mode 100644 MyApplication/app/src/main/res/values-w600dp/dimens.xml
create mode 100644 MyApplication/app/src/main/res/values/dimens.xml
create mode 100644 MyApplication/hs_err_pid15008.log
create mode 100644 MyApplication/hs_err_pid2092.log
create mode 100644 MyApplication/replay_pid15008.log
diff --git a/MyApplication/.idea/misc.xml b/MyApplication/.idea/misc.xml
index e16b229..0911bf5 100644
--- a/MyApplication/.idea/misc.xml
+++ b/MyApplication/.idea/misc.xml
@@ -3,7 +3,13 @@
diff --git a/MyApplication/app/build.gradle b/MyApplication/app/build.gradle
index 3fe5308..e7b4f4d 100644
--- a/MyApplication/app/build.gradle
+++ b/MyApplication/app/build.gradle
@@ -4,10 +4,12 @@ plugins {
android {
compileSdk 30
-
+ viewBinding {
+ enabled = true
+ }
defaultConfig {
applicationId "com.example.myapplication"
- minSdk 15
+ minSdk 25
targetSdk 30
versionCode 1
versionName "1.0"
@@ -25,16 +27,23 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+ buildFeatures {
+ viewBinding true
+ }
}
dependencies {
-//
-// implementation 'androidx.appcompat:appcompat:1.2.0'
-// implementation 'com.google.android.material:material:1.3.0'
+
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+ implementation 'androidx.navigation:navigation-fragment:2.3.5'
+ implementation 'androidx.navigation:navigation-ui:2.3.5'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+
//androidx project
implementation 'com.github.xuexiangjys:XUI:1.1.8'
@@ -42,4 +51,5 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
+ implementation 'com.jpeng:JPTabBar:1.1.2'
}
\ No newline at end of file
diff --git a/MyApplication/app/src/main/AndroidManifest.xml b/MyApplication/app/src/main/AndroidManifest.xml
index dddd32f..62d4e2c 100644
--- a/MyApplication/app/src/main/AndroidManifest.xml
+++ b/MyApplication/app/src/main/AndroidManifest.xml
@@ -3,22 +3,24 @@
package="com.example.myapplication">
-
-
+ android:theme="@style/AppTheme">
+
+
+
\ No newline at end of file
diff --git a/MyApplication/app/src/main/java/com/example/myapplication/MainActivity.java b/MyApplication/app/src/main/java/com/example/myapplication/MainActivity.java
deleted file mode 100644
index e640aaf..0000000
--- a/MyApplication/app/src/main/java/com/example/myapplication/MainActivity.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.example.myapplication;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import android.os.Bundle;
-
-public class MainActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- }
-}
\ No newline at end of file
diff --git a/MyApplication/app/src/main/java/com/example/myapplication/MyApplication.java b/MyApplication/app/src/main/java/com/example/myapplication/MyApplication.java
new file mode 100644
index 0000000..9dcf3c6
--- /dev/null
+++ b/MyApplication/app/src/main/java/com/example/myapplication/MyApplication.java
@@ -0,0 +1,16 @@
+package com.example.myapplication;
+
+import android.app.Application;
+
+import com.xuexiang.xui.XUI;
+
+
+public class MyApplication extends Application {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ XUI.init(this);
+ XUI.debug(true);
+ }
+
+}
diff --git a/MyApplication/app/src/main/java/com/example/myapplication/activity/LauncherActivity.java b/MyApplication/app/src/main/java/com/example/myapplication/activity/LauncherActivity.java
new file mode 100644
index 0000000..ebed9fa
--- /dev/null
+++ b/MyApplication/app/src/main/java/com/example/myapplication/activity/LauncherActivity.java
@@ -0,0 +1,81 @@
+package com.example.myapplication.activity;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+
+import com.example.myapplication.R;
+import com.example.myapplication.databinding.ActivityLauncherBinding;
+import com.xuexiang.xui.widget.banner.anim.select.ZoomInEnter;
+import com.xuexiang.xui.widget.banner.transform.RotateDownTransformer;
+import com.xuexiang.xui.widget.banner.widget.banner.SimpleGuideBanner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LauncherActivity extends AppCompatActivity {
+ private SimpleGuideBanner mSimpleGuideBanner;
+
+ private ActivityLauncherBinding binding;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ binding = ActivityLauncherBinding.inflate(this.getLayoutInflater());
+ setContentView(binding.getRoot());
+ mSimpleGuideBanner = binding.sgb;
+ showSimpleGuideBanner();
+ startThread();
+ }
+
+ public void startThread(){
+ Thread myThread = new Thread() {//创建子线程
+ @Override
+ public void run() {
+ try {
+ sleep(2000);//使程序休眠一秒
+ pageJump();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ };
+ myThread.start();//启动线程
+ }
+
+
+ private void showSimpleGuideBanner() {
+ mSimpleGuideBanner
+ .setIndicatorWidth(6)
+ .setIndicatorHeight(6)
+ .setIndicatorGap(12)
+ .setIndicatorCornerRadius(3.5f)
+ .setSelectAnimClass(ZoomInEnter.class)//设置显示器选中动画
+ .setTransformerClass(RotateDownTransformer.class)//页面滚动效果
+ .barPadding(0, 10, 0, 10)
+ .setSource(getUserGuides())//设置图片资源
+ .startScroll();
+
+ //点击跳过或者立即体验的监听
+ mSimpleGuideBanner.setOnJumpClickListener(new SimpleGuideBanner.OnJumpClickListener() {
+ @Override
+ public void onJumpClick() {
+ pageJump();
+ }
+ });
+ }
+
+ public void pageJump(){
+ //跳转到 MainActivity
+ Intent intent = new Intent(LauncherActivity.this, MainActivity.class);
+ startActivity(intent);
+ finish();//关闭当前活动
+ }
+
+
+ private static List