每日签到dailog
This commit is contained in:
parent
fa5e68838e
commit
c7c03fb750
|
|
@ -12,7 +12,7 @@ class DailySignDialog(context: Context) : BindingDialog<DialogDailySignBinding>(
|
|||
fun build(): DailySignDialog {
|
||||
with()
|
||||
setCenter()
|
||||
setMaskValue(0.8f)
|
||||
setMaskValue(0.9f)
|
||||
|
||||
mBinding.run {
|
||||
setOnClickBatch(butLeft, butRight) {
|
||||
|
|
@ -61,6 +61,8 @@ class DailySignDialog(context: Context) : BindingDialog<DialogDailySignBinding>(
|
|||
signItem6.setData(mDataList.get(5))
|
||||
signItem7.setData(mDataList.get(6))
|
||||
}
|
||||
|
||||
signItem7.setLargeWidthMode()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@ class DailySignItemView @JvmOverloads constructor(
|
|||
mBinding.tvDayNum.text = context.getString(R.string.day) + " "+ mData.dayIndex
|
||||
}
|
||||
|
||||
fun setLargeWidthMode() {
|
||||
mBinding.ivGold.setImageResource(R.mipmap.icon_gold_x3)
|
||||
mBinding.ivBg.setImageResource(R.mipmap.bg_biginner_daily_large)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
|
|
@ -12,27 +12,31 @@
|
|||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/img"/>
|
||||
android:src="@mipmap/bg_biginner_daily"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_gold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/temp"/>
|
||||
android:src="@mipmap/icon_glod_small"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_gold_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/red_0b"
|
||||
|
|
@ -46,7 +50,7 @@
|
|||
android:id="@+id/tv_day_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/gray3"
|
||||
android:text="Dia"
|
||||
|
|
|
|||
|
|
@ -1,22 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/daily_sign_bg"
|
||||
app:layout_constraintDimensionRatio="w, 1058,1413" >
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/daily_sign_bg"
|
||||
android:layout_marginTop="30dp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_close"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
|
||||
|
|
@ -25,12 +28,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginRight="45dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:clipChildren="false"
|
||||
>
|
||||
|
||||
|
|
@ -43,7 +42,7 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/temp"/>
|
||||
android:src="@mipmap/icon_smile"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -76,7 +75,6 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -92,6 +90,7 @@
|
|||
<com.gamedog.vididin.widget.DailySignItemView
|
||||
android:id="@+id/sign_item_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
|
@ -99,12 +98,14 @@
|
|||
android:id="@+id/sign_item_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<com.gamedog.vididin.widget.DailySignItemView
|
||||
android:id="@+id/sign_item_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
@ -125,12 +126,14 @@
|
|||
android:id="@+id/sign_item_6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<com.gamedog.vididin.widget.DailySignItemView
|
||||
android:id="@+id/sign_item_7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="2"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
@ -146,13 +149,12 @@
|
|||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/but_left"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_sign_left_but"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/red_2f"
|
||||
android:text="@string/resgatar"
|
||||
android:paddingVertical="14dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
|
|
@ -160,10 +162,15 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/but_right"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_sign_left_but">
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@mipmap/icon_action_but_bg"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -175,9 +182,8 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/temp"/>
|
||||
android:src="@mipmap/task_video"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -185,9 +191,8 @@
|
|||
android:layout_gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/red_2f"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/assistir"
|
||||
android:paddingVertical="14dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
@ -197,18 +202,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_gravity="top|right"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:layout_marginTop="-25dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:src="@mipmap/temp"/>
|
||||
android:src="@mipmap/icon_x2"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue