UI 居中
This commit is contained in:
parent
af6e5e6ef1
commit
e2371468b5
|
|
@ -6,6 +6,7 @@ import com.ama.core.architecture.util.AndroidUtil
|
|||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.ama.core.architecture.widget.BindingDialog
|
||||
import com.gamedog.vididin.VidiConst
|
||||
import com.gamedog.vididin.manager.WithdrawManager
|
||||
import com.gamedog.vididin.router.Router
|
||||
import com.viddin.videos.free.R
|
||||
import com.viddin.videos.free.databinding.DialogWithdrawWatchAdBinding as ViewBinding
|
||||
|
|
@ -28,6 +29,10 @@ class WithdrawWatchAdDialog(context: Activity, private var mWithdrawCashNum: Dou
|
|||
mBinding.run {
|
||||
progressBar.setBarColor(R.color.blue_ba, R.color.blue_ff)
|
||||
|
||||
val subItem = WithdrawManager.instance().getItem(0).subItemList[0]
|
||||
val progress = ((subItem.hasEarnMoneyByAd / subItem.cashTotal) * 100)
|
||||
progressBar.setProgress(progress.toInt())
|
||||
tvProgress.text = "%.2f".format(progress) + "%"
|
||||
|
||||
setOnClickBatch(flAction, ivClose) {
|
||||
when (this) {
|
||||
|
|
|
|||
|
|
@ -89,15 +89,29 @@
|
|||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<com.ama.core.architecture.widget.CustomProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="40dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="20dp"
|
||||
/>
|
||||
android:layout_marginBottom="20dp">
|
||||
<com.ama.core.architecture.widget.CustomProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#FFFFFF"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue