Browse Source

更新2.2.1版本包,添加第三方沉浸式

Xieshengqi 5 years ago
parent
commit
dff0e9662f

+ 5 - 0
app/build.gradle

@@ -235,6 +235,11 @@ android {
235 235
         implementation 'com.alibaba:fastjson:1.1.70.android'
236 236
         implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
237 237
         implementation project(':ocr_ui')
238
+
239
+        // 基础依赖包,必须要依赖
240
+        implementation 'com.gyf.immersionbar:immersionbar:3.0.0-beta05'
241
+// fragment快速实现(可选)
242
+        implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0-beta05'
238 243
     }
239 244
     def product_name = "bangnidai_v" + android.defaultConfig.versionName
240 245
     def time = "1367"

+ 4 - 0
app/proguard-rules.pro

@@ -423,4 +423,8 @@
423 423
 
424 424
 -keepattributes Signature
425 425
 -dontwarn com.alibaba.fastjson.**
426
+
426 427
 -keep class com.alibaba.fastjson.**{*;}
428
+
429
+ -keep class com.gyf.immersionbar.* {*;}
430
+ -dontwarn com.gyf.immersionbar.**

+ 15 - 1
app/src/main/AndroidManifest.xml

@@ -33,13 +33,27 @@
33 33
         android:supportsRtl="true"
34 34
         android:theme="@style/AppTheme"
35 35
         tools:replace="android:icon, android:theme">
36
+
37
+
38
+        <meta-data
39
+            android:name="android.max_aspect"
40
+            android:value="2.4" />
41
+
42
+        <!--适配华为(huawei)刘海屏-->
43
+        <meta-data
44
+            android:name="android.notch_support"
45
+            android:value="true"/>
46
+        <!--适配小米(xiaomi)刘海屏-->
47
+        <meta-data
48
+            android:name="notch.config"
49
+            android:value="portrait|landscape" />
36 50
         <meta-data
37 51
             android:name="design_width"
38 52
             android:value="375" />
39 53
         <meta-data
40 54
             android:name="design_height"
41 55
             android:value="667" />
42
-
56
+A
43 57
         <activity
44 58
             android:name=".moneyplatfrom.activities.MainActivity"
45 59
             android:launchMode="singleTask"

+ 1 - 1
build.gradle

@@ -38,7 +38,7 @@ ext{
38 38
     versionName = '1.0.0'
39 39
 
40 40
     // 相关依赖库版本
41
-    supportVersion = '25.+'
41
+    supportVersion = '28.0.0'
42 42
     butterknifeVersion = '8.5.1'
43 43
     geniusVersion = '2.0.0'
44 44
     glideVersion = '3.7.0'

+ 6 - 0
common/build.gradle

@@ -50,4 +50,10 @@ dependencies {
50 50
 
51 51
     //加载框
52 52
     implementation 'com.github.gittjy:LoadingDialog:1.0.2'
53
+
54
+
55
+    // 基础依赖包,必须要依赖
56
+    implementation 'com.gyf.immersionbar:immersionbar:3.0.0-beta05'
57
+// fragment快速实现(可选)
58
+    implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0-beta05'
53 59
 }

+ 6 - 3
common/src/main/java/com/smileflowpig/money/common/app/Activity.java

@@ -16,6 +16,7 @@ import android.view.WindowManager;
16 16
 
17 17
 import com.android.tu.loadingdialog.LoadingDailog;
18 18
 import com.android.tu.loadingdialog.LoadingDialog;
19
+import com.gyf.immersionbar.ImmersionBar;
19 20
 import com.smileflowpig.money.common.R;
20 21
 import com.smileflowpig.money.common.utils.NavigationBarUtil;
21 22
 import com.smileflowpig.money.common.utils.NotchUtil;
@@ -53,11 +54,13 @@ public abstract class Activity extends AutoLayoutActivity {
53 54
             // 得到界面Id并设置到Activity界面中
54 55
             int layId = getContentLayoutId();
55 56
             ViewGroup inflate = (ViewGroup) LayoutInflater.from(this).inflate(layId, null);
57
+            ImmersionBar.with(this).statusBarDarkFont(true).init();
56 58
             setContentView(inflate);
57 59
             //判断是不是androidP系统
58
-            if (Build.VERSION.SDK_INT >= 28 &&isNeedNotch()) {
59
-                NotchUtil.adaptationView(inflate, this);
60
-            }
60
+//            if (Build.VERSION.SDK_INT >= 28 &&isNeedNotch()) {
61
+//                NotchUtil.adaptationView(inflate, this);
62
+//            }
63
+
61 64
             initBefore();
62 65
             initWidget();
63 66
             initData();

+ 2 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -5,3 +5,5 @@ zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6 6
 distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 7
 android.enableAapt2=false
8
+android.useAndroidX=true
9
+android.enableJetifier=true