liuyuqi-dellpc 4 years ago
parent
commit
f7f69fa868

+ 1 - 0
app/build.gradle

@@ -26,6 +26,7 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.2.0'
     implementation 'androidx.appcompat:appcompat:1.2.0'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
     implementation 'androidx.preference:preference:1.1.1'
     implementation 'androidx.preference:preference:1.1.1'
+    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
 
 
     testImplementation 'junit:junit:4.12'
     testImplementation 'junit:junit:4.12'
     androidTestImplementation 'androidx.test.ext:junit:1.1.2'
     androidTestImplementation 'androidx.test.ext:junit:1.1.2'

+ 5 - 3
app/src/main/AndroidManifest.xml

@@ -10,9 +10,8 @@
         android:roundIcon="@mipmap/ic_launcher_round"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
         android:theme="@style/AppTheme">
-        <activity
-            android:name=".views.SettingsActivity"
-            android:label="@string/title_activity_settings"></activity>
+
+
         <activity android:name=".MainActivity">
         <activity android:name=".MainActivity">
             <intent-filter>
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <action android:name="android.intent.action.MAIN" />
@@ -20,6 +19,9 @@
                 <category android:name="android.intent.category.LAUNCHER" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
             </intent-filter>
         </activity>
         </activity>
+        <activity
+            android:name=".views.SettingsActivity"
+            android:label="@string/title_activity_settings" />
         <activity
         <activity
             android:name=".views.ReceiveActivity"
             android:name=".views.ReceiveActivity"
             android:excludeFromRecents="true">
             android:excludeFromRecents="true">

+ 1 - 0
app/src/main/java/me/yoqi/android/open2share/MainActivity.java

@@ -27,6 +27,7 @@ public class MainActivity extends AppCompatActivity {
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_setting);
         setContentView(R.layout.activity_setting);
+
         mContext = this;
         mContext = this;
         spUtils = new SPUtils(mContext);
         spUtils = new SPUtils(mContext);
         toast = new SimplexToast(mContext);
         toast = new SimplexToast(mContext);

+ 6 - 1
app/src/main/java/me/yoqi/android/open2share/views/SettingsActivity.java

@@ -1,7 +1,12 @@
 package me.yoqi.android.open2share.views;
 package me.yoqi.android.open2share.views;
 
 
 import android.os.Bundle;
 import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
 
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
 import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.preference.PreferenceFragmentCompat;
 import androidx.preference.PreferenceFragmentCompat;
@@ -21,7 +26,7 @@ public class SettingsActivity extends AppCompatActivity {
                 .commit();
                 .commit();
         ActionBar actionBar = getSupportActionBar();
         ActionBar actionBar = getSupportActionBar();
         if (actionBar != null) {
         if (actionBar != null) {
-            actionBar.setDisplayHomeAsUpEnabled(true);
+            actionBar.setDisplayHomeAsUpEnabled(true); //设置导航按钮可见
         }
         }
     }
     }
 
 

+ 2 - 0
app/src/main/res/values/strings.xml

@@ -17,4 +17,6 @@
     <string name="attachment_summary_on">Automatically download attachments for incoming emails
     <string name="attachment_summary_on">Automatically download attachments for incoming emails
     </string>
     </string>
     <string name="attachment_summary_off">Only download attachments when manually requested</string>
     <string name="attachment_summary_off">Only download attachments when manually requested</string>
+    <!-- TODO: Remove or change this placeholder text -->
+    <string name="hello_blank_fragment">Hello blank fragment</string>
 </resources>
 </resources>

+ 4 - 0
keystore.properties

@@ -0,0 +1,4 @@
+storeFile=C:\\Users\\liuyuqi\\OneDrive\\cert\\android\\coding-android-sign-dev.jks
+keyAlias=key0
+keyPassword=coding321
+storePassword=coding321