@aks-dev/easyui 1.0.60 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-05-05 13:57:25
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-06-08 10:55:21
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/UpgradeModule.java
|
|
7
7
|
*/
|
|
8
8
|
package com.easyui;
|
|
@@ -45,6 +45,7 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
45
45
|
import com.facebook.react.bridge.ReadableMap;
|
|
46
46
|
|
|
47
47
|
import org.jetbrains.annotations.NotNull;
|
|
48
|
+
import org.w3c.dom.Text;
|
|
48
49
|
|
|
49
50
|
import java.io.File;
|
|
50
51
|
import java.io.FileOutputStream;
|
|
@@ -104,6 +105,7 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
104
105
|
public void upgrade(final ReadableMap info, final Promise promise) {
|
|
105
106
|
HashMap hashMap = info.toHashMap();
|
|
106
107
|
String version = (String) hashMap.get("version");
|
|
108
|
+
String title = (String) hashMap.get("title");
|
|
107
109
|
String downloadUrl = (String) hashMap.get("downloadUrl");
|
|
108
110
|
String note = (String) hashMap.get("note");
|
|
109
111
|
Boolean force = (Boolean) hashMap.get("force");
|
|
@@ -150,8 +152,10 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
150
152
|
TextView contentView = view.findViewById(R.id.content);
|
|
151
153
|
Button confirmBtn = view.findViewById(R.id.btn_comfirm);
|
|
152
154
|
Button cancelBtn = view.findViewById(R.id.btn_cancel);
|
|
155
|
+
TextView titleView = view.findViewById(R.id.txt_title);
|
|
153
156
|
|
|
154
157
|
contentView.setText(note);
|
|
158
|
+
titleView.setText(title);
|
|
155
159
|
confirmBtn.setOnClickListener(new View.OnClickListener() {
|
|
156
160
|
@Override
|
|
157
161
|
public void onClick(View v) {
|
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
android:id="@+id/update_root"
|
|
4
|
-
android:
|
|
4
|
+
android:layout_width="match_parent"
|
|
5
5
|
android:layout_height="wrap_content"
|
|
6
|
-
android:background="@drawable/upgrade_bg"
|
|
6
|
+
android:background="@drawable/upgrade_bg"
|
|
7
|
+
android:orientation="vertical">
|
|
7
8
|
|
|
8
9
|
<LinearLayout
|
|
9
10
|
android:layout_width="match_parent"
|
|
10
|
-
android:layout_height="
|
|
11
|
+
android:layout_height="wrap_content"
|
|
11
12
|
android:layout_alignParentBottom="true"
|
|
12
13
|
android:paddingLeft="15dp"
|
|
13
|
-
android:paddingRight="15dp"
|
|
14
|
+
android:paddingRight="15dp"
|
|
15
|
+
android:orientation="vertical"
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
<TextView
|
|
19
|
+
android:id="@+id/txt_title"
|
|
20
|
+
android:layout_width="match_parent"
|
|
21
|
+
android:layout_height="wrap_content"
|
|
22
|
+
android:gravity="center"
|
|
23
|
+
android:text="标题"
|
|
24
|
+
android:textColor="#333333"
|
|
25
|
+
android:textSize="16sp"
|
|
26
|
+
android:textStyle="bold" />
|
|
14
27
|
|
|
15
28
|
<TextView
|
|
16
29
|
android:id="@+id/content"
|
|
17
30
|
android:layout_width="wrap_content"
|
|
18
31
|
android:layout_height="wrap_content"
|
|
32
|
+
android:minHeight="190dp"
|
|
19
33
|
android:singleLine="false"
|
|
20
|
-
android:text="1.升级说明123123\\n2.升级说明22222"/>
|
|
34
|
+
android:text="1.升级说明123123\\n2.升级说明22222" />
|
|
21
35
|
|
|
22
36
|
</LinearLayout>
|
|
23
37
|
|
|
@@ -30,22 +44,22 @@
|
|
|
30
44
|
|
|
31
45
|
<Button
|
|
32
46
|
android:id="@+id/btn_comfirm"
|
|
47
|
+
style="?android:attr/borderlessButtonStyle"
|
|
33
48
|
android:layout_width="200dp"
|
|
34
49
|
android:layout_height="35dp"
|
|
35
|
-
android:textColor="#FFFFFF"
|
|
36
50
|
android:background="@drawable/update_confirm_btn"
|
|
37
51
|
android:text="立即升级"
|
|
38
|
-
|
|
52
|
+
android:textColor="#FFFFFF" />
|
|
39
53
|
|
|
40
54
|
<Button
|
|
41
55
|
android:id="@+id/btn_cancel"
|
|
56
|
+
style="?android:attr/borderlessButtonStyle"
|
|
42
57
|
android:layout_width="200dp"
|
|
43
58
|
android:layout_height="35dp"
|
|
44
59
|
android:layout_alignBottom="@id/btn_comfirm"
|
|
45
|
-
android:background="@drawable/update_cancel_btn"
|
|
46
60
|
android:layout_marginTop="10dp"
|
|
47
|
-
android:
|
|
61
|
+
android:background="@drawable/update_cancel_btn"
|
|
48
62
|
android:text="残忍拒绝"
|
|
49
|
-
|
|
63
|
+
android:textColor="#CCCCCC" />
|
|
50
64
|
</LinearLayout>
|
|
51
65
|
</RelativeLayout>
|