Ver código fonte

增加进入设置菜单入口

weizhengliang 3 anos atrás
pai
commit
78ded51a04

+ 6 - 0
.idea/compiler.xml

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

+ 40 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="BintrayJCenter" />
+      <option name="name" value="BintrayJCenter" />
+      <option name="url" value="https://jcenter.bintray.com/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="Google" />
+      <option name="name" value="Google" />
+      <option name="url" value="https://dl.google.com/dl/android/maven2/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\m2repository" />
+      <option name="name" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\m2repository" />
+      <option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/m2repository" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\android\m2repository" />
+      <option name="name" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\android\m2repository" />
+      <option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/android/m2repository" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\google\m2repository" />
+      <option name="name" value="C:\Users\wdkl_soft1\AppData\Local\Android\Sdk\extras\google\m2repository" />
+      <option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/google/m2repository" />
+    </remote-repository>
+  </component>
+</project>

+ 6 - 1
app/build.gradle

@@ -8,7 +8,7 @@ android {
         minSdkVersion 15
         targetSdkVersion 30
         versionCode 1
-        versionName "1.6"
+        versionName "1.7"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
     buildTypes {
@@ -28,6 +28,11 @@ android {
         checkReleaseBuilds false
         abortOnError false
     }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
 }
 
 dependencies {

BIN
app/release/kanban_v1.7_20220224.apk


+ 17 - 0
app/src/main/java/com/example/informationkanban/InitActivity.java

@@ -6,6 +6,7 @@ import android.content.Intent;
 import android.graphics.Color;
 import android.os.Bundle;
 import android.os.CountDownTimer;
+import android.provider.Settings;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.LayoutInflater;
@@ -35,6 +36,7 @@ public class InitActivity extends AppCompatActivity {
     private RadioButton btnWebview;
     private RadioButton btnXwalk;
     private Button btnChangeIp;
+    private Button btnSettings;
     private Button btnEnterMain;
 
     private boolean loop = true;
@@ -58,6 +60,7 @@ public class InitActivity extends AppCompatActivity {
         btnWebview = findViewById(R.id.radio_webview);
         btnXwalk = findViewById(R.id.radio_xwalk);
         btnChangeIp = findViewById(R.id.btn_change_ip);
+        btnSettings = findViewById(R.id.btn_settings);
         btnEnterMain = findViewById(R.id.btn_enter_main);
 
         //webview类型,默认为原生webview
@@ -100,6 +103,20 @@ public class InitActivity extends AppCompatActivity {
             }
         });
 
+        btnSettings.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //取消倒计时
+                if (countDownTimer != null) {
+                    countDownTimer.cancel();
+                }
+                btnEnterMain.setVisibility(View.VISIBLE);
+                tvTime.setVisibility(View.INVISIBLE);
+
+                startActivity(new Intent(Settings.ACTION_SETTINGS));
+            }
+        });
+
         btnEnterMain.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {

+ 16 - 5
app/src/main/res/layout/init_layout.xml

@@ -36,13 +36,24 @@
         android:layout_marginTop="10dp"
         android:textSize="24sp" />
 
-    <Button
-        android:id="@+id/btn_change_ip"
+    <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="20dp"
-        android:text="修改服务器地址"
-        android:textSize="20sp"/>
+        android:layout_marginTop="20dp">
+        <Button
+            android:id="@+id/btn_change_ip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="修改服务器地址"
+            android:textSize="20sp"/>
+        <Button
+            android:id="@+id/btn_settings"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="20dp"
+            android:text="进入设置"
+            android:textSize="20sp"/>
+    </LinearLayout>
 
     <RadioGroup
         android:id="@+id/group_webview_type"