福利act UI
|
|
@ -4,6 +4,8 @@ import android.app.Activity
|
|||
import android.content.Intent
|
||||
import android.view.LayoutInflater
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.ama.core.architecture.appBase.AppViewsActivity
|
||||
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
|
@ -20,6 +22,10 @@ class BenefitActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
|||
override val mViewModel: ViewModel by viewModels()
|
||||
override fun inflateViewBinding(inflater: LayoutInflater) = ViewBinding.inflate(inflater)
|
||||
|
||||
override fun ViewBinding.initWindowInsets() {
|
||||
setImmerseRootView(contentRoot)
|
||||
}
|
||||
|
||||
|
||||
override fun ViewBinding.initViews() {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient android:type="linear" android:useLevel="true"
|
||||
android:startColor="#00fededd"
|
||||
android:endColor="#ffffeded"
|
||||
android:angle="180" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#fffff2f2" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#fffffFFF" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
|
||||
|
||||
|
|
@ -1,32 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView 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:layout_height="match_parent"
|
||||
android:background="#fff6efff">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/temp_bg"
|
||||
/>
|
||||
|
||||
|
||||
<com.ama.core.architecture.widget.CustomTitleBar
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
app:titleText="Benefícios"
|
||||
app:titleTextColor="@android:color/white"
|
||||
app:titleTextSize="18sp"
|
||||
app:leftIcon="@mipmap/temp"
|
||||
app:titleBarBackground="#FF6B9E"
|
||||
app:rightButtonSpacing="8dp"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="-15dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/benefit_bg_top"
|
||||
/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/content_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<com.ama.core.architecture.widget.CustomTitleBar
|
||||
android:id="@+id/titlebar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="60dp">
|
||||
android:layout_marginTop="20dp">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -37,7 +42,7 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/temp"
|
||||
android:src="@mipmap/benefit_top_left"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
|
@ -52,16 +57,237 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/temp"
|
||||
android:src="@mipmap/benefit_top_right"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_benefit_top_white"
|
||||
android:padding="15dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="15dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@drawable/bg_benefit_top_items"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="-40dp"
|
||||
android:gravity="center_vertical" >
|
||||
<!--items-1-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal" >
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/benefit_item_expired"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_expired_cash_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/cash01"/>
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/gray_60"
|
||||
android:text="@string/expired"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!--items-1-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal" >
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/benefit_item_ongoing"/>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/tv_ongoing_cash_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:src="@mipmap/icon_check_mark"/>
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/green_39"
|
||||
android:text="@string/onging"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!--items-3-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal" >
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/benefit_item_waitting"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_waiting_cash_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/cash01"/>
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/red_5c"
|
||||
android:text="@string/waitting"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:background="@mipmap/but_bg_grady"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/resgatar"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_benefit_top_white"
|
||||
android:padding="15dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="15dp">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="15dp"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:textSize="15sp"
|
||||
android:background="@drawable/bg_benefit_tasks_top"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:textColor="@color/black_33"
|
||||
android:text="@string/benefit_task_top_hint"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/gray6"
|
||||
android:text="@string/progress"/>
|
||||
|
||||
<com.ama.core.architecture.widget.CustomProgressBar
|
||||
android:id="@+id/progress_tasks"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_progress_num"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/gray9"
|
||||
android:text="(0%)"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/gray_f2"
|
||||
/>
|
||||
<com.gamedog.vididin.main.fragments.task.widget.DailyTaskItemView
|
||||
android:id="@+id/daily_task_watch_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 814 B |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 886 B |
|
|
@ -82,6 +82,8 @@
|
|||
<color name="green_54">#FF00FF54</color>
|
||||
<color name="red_00_dark">#FF783100</color>
|
||||
<color name="red_10_dark">#FF872D10</color>
|
||||
<color name="gray_60">#FF606060</color>
|
||||
<color name="black_33">#333333</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
@ -40,8 +40,10 @@
|
|||
<string name="zero_menu_records">Meus Prêmios</string>
|
||||
<string name="lottery_record">Histórico de Prêmios</string>
|
||||
<string name="zero_buy">Festa Grátis</string>
|
||||
|
||||
|
||||
<string name="expired">Expirado</string>
|
||||
<string name="onging">Concluído</string>
|
||||
<string name="waitting">Em andamento</string>
|
||||
<string name="benefit_task_top_hint">Conclua todas as tarefas para retirar R$ 1.0</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,6 +1,21 @@
|
|||
package com.ama.core.architecture.base
|
||||
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity()
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
protected fun setImmerseRootView(rootView: View) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v, insets ->
|
||||
val systemBars = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout() or WindowInsetsCompat.Type.ime()
|
||||
)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,19 @@
|
|||
package com.ama.core.architecture.base
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
|
||||
|
||||
open class BaseFragment : Fragment()
|
||||
open class BaseFragment : Fragment() {
|
||||
protected fun setImmerseRootView(rootView: View) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v, insets ->
|
||||
val systemBars = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout() or WindowInsetsCompat.Type.ime()
|
||||
)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
insets
|
||||
}
|
||||
}
|
||||
}
|
||||