每日签到 调整
This commit is contained in:
parent
d3fab79e75
commit
5a6cef78b2
|
|
@ -12,12 +12,15 @@ class DailySignDialog(context: Context) : BindingDialog<DialogDailySignBinding>(
|
||||||
fun build(): DailySignDialog {
|
fun build(): DailySignDialog {
|
||||||
with()
|
with()
|
||||||
setCenter()
|
setCenter()
|
||||||
|
setCanCancel(false)
|
||||||
setMaskValue(0.9f)
|
setMaskValue(0.9f)
|
||||||
|
setWidthRatio(0.93)
|
||||||
|
|
||||||
|
|
||||||
mBinding.run {
|
mBinding.run {
|
||||||
setOnClickBatch(butLeft, butRight) {
|
setOnClickBatch(butLeft, butRight, ivClose) {
|
||||||
when (this) {
|
when (this) {
|
||||||
butLeft -> {
|
butLeft, ivClose -> {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
butRight -> {
|
butRight -> {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,221 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/daily_sign_bg"
|
android:layout_marginTop="20dp">
|
||||||
android:layout_marginTop="30dp"
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
/>
|
android:id="@+id/aspect_ratio_view"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/daily_sign_bg"
|
||||||
|
android:paddingEnd="-28dp"
|
||||||
|
app:layout_constraintDimensionRatio="H,1058:1413"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="30dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="28dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="-10dp"
|
||||||
|
android:src="@mipmap/icon_smile"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:src="@mipmap/temp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_desc"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-5dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/gray6"
|
||||||
|
android:text="@string/daily_sign_desc"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_times"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/gray9"
|
||||||
|
android:text="@string/daily_sign_times"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.gamedog.vididin.widget.DailySignItemView
|
||||||
|
android:id="@+id/sign_item_1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
<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"
|
||||||
|
/>
|
||||||
|
<com.gamedog.vididin.widget.DailySignItemView
|
||||||
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.gamedog.vididin.widget.DailySignItemView
|
||||||
|
android:id="@+id/sign_item_5"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
<com.gamedog.vididin.widget.DailySignItemView
|
||||||
|
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>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/but_left"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
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:gravity="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/but_right"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
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"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@mipmap/task_video"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/assistir"
|
||||||
|
android:gravity="center"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_gravity="top|right"
|
||||||
|
android:layout_marginTop="-25dp"
|
||||||
|
android:layout_marginRight="3dp"
|
||||||
|
android:src="@mipmap/icon_x2"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_close"
|
android:id="@+id/iv_close"
|
||||||
|
|
@ -23,192 +228,13 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:layout_marginRight="45dp"
|
|
||||||
android:layout_marginTop="60dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@mipmap/icon_smile"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:src="@mipmap/temp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_desc"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/gray6"
|
|
||||||
android:text="@string/daily_sign_desc"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_times"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/gray9"
|
|
||||||
android:text="@string/daily_sign_times"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<com.gamedog.vididin.widget.DailySignItemView
|
|
||||||
android:id="@+id/sign_item_1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
/>
|
|
||||||
<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"
|
|
||||||
/>
|
|
||||||
<com.gamedog.vididin.widget.DailySignItemView
|
|
||||||
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>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<com.gamedog.vididin.widget.DailySignItemView
|
|
||||||
android:id="@+id/sign_item_5"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
/>
|
|
||||||
<com.gamedog.vididin.widget.DailySignItemView
|
|
||||||
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>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/but_left"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
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:gravity="center"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/but_right"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
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"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:src="@mipmap/task_video"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/assistir"
|
|
||||||
android:gravity="center"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_gravity="top|right"
|
|
||||||
android:layout_marginTop="-25dp"
|
|
||||||
android:layout_marginRight="3dp"
|
|
||||||
android:src="@mipmap/icon_x2"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue