Browse Source

1.添加app升级弹窗

王鹏鹏 2 years ago
parent
commit
439dca096c

+ 4 - 0
home/src/main/java/com/yingyangfly/home/dialog/DownlaodAppFragment.kt

@@ -32,6 +32,7 @@ class DownlaodAppFragment : DialogFragment(), View.OnTouchListener {
     private var upgradeBtn: AppCompatButton? = null
     private var progressBar: ProgressBar? = null
     private var tvProgress: AppCompatTextView? = null
+    private var tvTitle: AppCompatTextView? = null
 
     private var content: Context? = null
     private var url: String = ""
@@ -76,6 +77,7 @@ class DownlaodAppFragment : DialogFragment(), View.OnTouchListener {
     private fun findId(rootView: View) {
         upgradeBtn = rootView.findViewById(R.id.upgradeBtn)
         tvProgress = rootView.findViewById(R.id.tvProgress)
+        tvTitle = rootView.findViewById(R.id.tvTitle)
         progressBar = rootView.findViewById(R.id.progressBar)
     }
 
@@ -94,6 +96,8 @@ class DownlaodAppFragment : DialogFragment(), View.OnTouchListener {
                                 upgradeBtn?.show(false)
                                 tvProgress?.show(true)
                                 progressBar?.show(true)
+                                tvTitle?.show(false)
+
                             }
                         }
 

+ 3 - 2
home/src/main/res/layout/fragment_down_load_app.xml

@@ -28,6 +28,7 @@
             android:scaleType="centerInside" />
 
         <androidx.appcompat.widget.AppCompatTextView
+            android:id="@+id/tvTitle"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/divider_30px"
@@ -53,8 +54,8 @@
             android:id="@+id/tvProgress"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/divider_15px"
-            android:layout_marginTop="@dimen/divider_15px"
+            android:layout_marginStart="@dimen/divider_30px"
+            android:layout_marginTop="@dimen/divider_30px"
             android:text="@string/app_updater_start_notification_content"
             android:textColor="@color/color_4A76FF"
             android:textSize="@dimen/divider_26px"