0元购记录
This commit is contained in:
parent
04c3223e5a
commit
6322e04a36
|
|
@ -7,56 +7,95 @@ import androidx.activity.viewModels
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.core.view.updatePadding
|
import androidx.core.view.updatePadding
|
||||||
import com.ama.core.architecture.appBase.AppViewsActivity
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.ama.core.architecture.appBase.AppViewsEmptyViewModelActivity
|
||||||
|
import com.ama.core.architecture.util.CommonItemDecoration
|
||||||
|
import com.gamedog.vididin.beans.ZeroBuyResp
|
||||||
|
import com.gamedog.vididin.features.zero.ZeroBuyViewModel
|
||||||
|
import com.gamedog.vididin.features.zero.ZeroRecordAdapter
|
||||||
import com.vididin.real.money.game.R
|
import com.vididin.real.money.game.R
|
||||||
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
||||||
|
import com.gamedog.vididin.netbase.Result
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import kotlin.getValue
|
import kotlin.getValue
|
||||||
import com.vididin.real.money.game.databinding.ActivityWinRecordBinding as ViewBinding
|
import com.vididin.real.money.game.databinding.ActivityWinRecordBinding as ViewBinding
|
||||||
import com.gamedog.vididin.main.MainUiState as UiState
|
|
||||||
import com.gamedog.vididin.main.MainViewModel as ViewModel
|
|
||||||
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class WinRecordsActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnTabStyleListener {
|
class WinRecordsActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabStyleListener {
|
||||||
|
|
||||||
|
private val viewModel: ZeroBuyViewModel by viewModels()
|
||||||
|
private lateinit var mAdapter: ZeroRecordAdapter
|
||||||
|
|
||||||
|
|
||||||
override val mViewModel: ViewModel by viewModels()
|
|
||||||
override fun inflateViewBinding(inflater: LayoutInflater) = ViewBinding.inflate(inflater)
|
override fun inflateViewBinding(inflater: LayoutInflater) = ViewBinding.inflate(inflater)
|
||||||
|
|
||||||
override fun ViewBinding.initViews() {
|
override fun ViewBinding.initViews() {
|
||||||
|
|
||||||
with(binding) {
|
with(binding) {
|
||||||
titlebar.setBackIconColor(R.color.black)
|
titlebar.setBackIconColor(R.color.black)
|
||||||
titlebar.setTitleText(R.string.lottery_record, R.color.black)
|
titlebar.setTitleText(R.string.lottery_record, R.color.black)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
with(recyclerView) {
|
||||||
|
mAdapter = ZeroRecordAdapter()
|
||||||
|
adapter = mAdapter
|
||||||
|
layoutManager = LinearLayoutManager(this@WinRecordsActivity, LinearLayoutManager.VERTICAL, false)
|
||||||
|
addItemDecoration(
|
||||||
|
CommonItemDecoration.create(horizontalSpace = 0, verticalSpace = 30)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun ViewBinding.initWindowInsets() {
|
override fun ViewBinding.initWindowInsets() {
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(contentRoot) { v, insets ->
|
setImmerseRootView(root)
|
||||||
|
/*ViewCompat.setOnApplyWindowInsetsListener(contentRoot) { v, insets ->
|
||||||
val systemBars =
|
val systemBars =
|
||||||
insets.getInsets(WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout())
|
insets.getInsets(WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout())
|
||||||
v.updatePadding(top = systemBars.top)
|
v.updatePadding(top = systemBars.top)
|
||||||
insets
|
insets
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun ViewBinding.initListeners() {
|
override fun ViewBinding.initListeners() {
|
||||||
//TODO("Not yet implemented")
|
//TODO("Not yet implemented")
|
||||||
|
requestData()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun ViewBinding.initObservers() {
|
override fun ViewBinding.initObservers() {
|
||||||
//TODO("Not yet implemented")
|
//TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun ViewBinding.onUiStateCollect(uiState: UiState) {
|
|
||||||
//TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTabIsDarkFont(isDarkFont: Boolean) {
|
override fun onTabIsDarkFont(isDarkFont: Boolean) {
|
||||||
//TODO("Not yet implemented")
|
//TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun requestData() {
|
||||||
|
lifecycleScope.launch {
|
||||||
|
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||||
|
viewModel.ZeroBuyListData.collect { result ->
|
||||||
|
when (result) {
|
||||||
|
is com.gamedog.vididin.netbase.Result.Loading -> { }
|
||||||
|
is com.gamedog.vididin.netbase.Result.Success -> updateUIs(result.data)
|
||||||
|
is Result.Error -> { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.requestZeroBuyInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateUIs(data: ZeroBuyResp) {
|
||||||
|
mAdapter.submitList(data.mCurrentList)
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
internal fun startActivity(activity: Activity) {
|
internal fun startActivity(activity: Activity) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.gamedog.vididin.features.zero
|
||||||
|
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
|
import androidx.recyclerview.widget.ListAdapter
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.gamedog.vididin.beans.ZeroBuyItem
|
||||||
|
import com.gamedog.vididin.core.login.login.AccountManager
|
||||||
|
import com.vididin.real.money.game.R
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import com.vididin.real.money.game.databinding.ZeroRecordWinBinding as ViewBinding
|
||||||
|
|
||||||
|
class ZeroRecordAdapter() : ListAdapter<ZeroBuyItem, ZeroRecordAdapter.ViewHolder>(DiffCallback()) {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
val binding = ViewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||||
|
return ViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
|
holder.bind(getItem(position))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun submitList(list: List<ZeroBuyItem?>?) {
|
||||||
|
val sortedList = list?.sortedBy { it?.end_time }
|
||||||
|
super.submitList(sortedList)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isWinItem(item: ZeroBuyItem): Boolean {
|
||||||
|
val winerIds = item.winners
|
||||||
|
return winerIds?.contains(AccountManager.getAccount()?.userId) ?: false
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ViewHolder(private val binding: ViewBinding) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
fun bind(item: ZeroBuyItem) {
|
||||||
|
val isWinItem = isWinItem(item)
|
||||||
|
|
||||||
|
with(binding) {
|
||||||
|
tvDateWin.text = SimpleDateFormat("yyyy/MM/dd").format(item.start_time * 1000)
|
||||||
|
rlBg.setBackgroundResource(if (isWinItem) R.drawable.bg_records_win else R.drawable.bg_records_lost)
|
||||||
|
ivLeftWin.setImageResource(if (isWinItem) R.mipmap.record_win else R.mipmap.record_lost)
|
||||||
|
tvTitleWin.text = item.title
|
||||||
|
//tvDescWin.text = item.
|
||||||
|
llRightWin.isVisible = isWinItem
|
||||||
|
llRightLost.isVisible = !isWinItem
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DiffCallback : DiffUtil.ItemCallback<ZeroBuyItem>() {
|
||||||
|
override fun areItemsTheSame(oldItem: ZeroBuyItem, newItem: ZeroBuyItem): Boolean {
|
||||||
|
return oldItem.id == newItem.id
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun areContentsTheSame(oldItem: ZeroBuyItem, newItem: ZeroBuyItem): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,200 +11,36 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
|
android:id="@+id/root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:layout_marginHorizontal="15dp"
|
android:layout_marginHorizontal="15dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_date_win"
|
android:id="@+id/tv_no_data_hint"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="75dp"
|
||||||
android:layout_marginTop="15dp"
|
android:textStyle="bold"
|
||||||
android:textSize="12sp"
|
android:gravity="center"
|
||||||
android:textColor="@color/gray6"
|
android:layout_gravity="center"
|
||||||
android:text="2025/10/31"
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/gray3"
|
||||||
|
android:text="@string/no_data_hint"
|
||||||
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@drawable/bg_records_win"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingVertical="5dp"
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_left_win"
|
|
||||||
android:layout_width="45dp"
|
|
||||||
android:layout_height="45dp"
|
|
||||||
android:src="@mipmap/record_win"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginHorizontal="10dp"
|
|
||||||
android:layout_toRightOf="@+id/iv_left_win"
|
|
||||||
android:layout_toLeftOf="@+id/ll_right_win"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
>
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_title_win"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/record_win_item_title"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_desc_win"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/white_alpha_99"
|
|
||||||
android:text="@string/record_win_item_desc"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_right_win"
|
|
||||||
android:layout_width="75dp"
|
|
||||||
android:layout_height="75dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:background="@mipmap/bg_record_win_rgiht"
|
|
||||||
android:paddingHorizontal="6dp"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_win_right_top"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textColor="@color/yellow_00"
|
|
||||||
android:text="Ganhar"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_win_right_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="11dp"
|
|
||||||
android:textSize="10sp"
|
|
||||||
android:textColor="@color/green_54"
|
|
||||||
android:text="Ver detalhes"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_date_lost"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textColor="@color/gray6"
|
|
||||||
android:text="2025/10/31"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@drawable/bg_records_lost"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingVertical="5dp"
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_left_lost"
|
|
||||||
android:layout_width="45dp"
|
|
||||||
android:layout_height="45dp"
|
|
||||||
android:src="@mipmap/record_lost"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginHorizontal="10dp"
|
|
||||||
android:layout_toRightOf="@+id/iv_left_lost"
|
|
||||||
android:layout_toLeftOf="@+id/ll_right_lost"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
>
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_title_lost"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/record_lost_item_title"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_desc_lost"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/white_alpha_99"
|
|
||||||
android:text="@string/record_lost_item_desc"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/ll_right_lost"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:background="@mipmap/bg_record_lost_rgiht"
|
|
||||||
android:paddingHorizontal="6dp"
|
|
||||||
android:gravity="center"
|
|
||||||
>
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_lost_right_top"
|
|
||||||
android:layout_width="75dp"
|
|
||||||
android:layout_height="75dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textColor="@color/gray9"
|
|
||||||
android:text="@string/not_win"
|
|
||||||
/>
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:id="@+id/content_root" >
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_date_lost"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/gray6"
|
||||||
|
android:text="2025/10/31"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_records_lost"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingVertical="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_left_lost"
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:src="@mipmap/record_lost"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_toRightOf="@+id/iv_left_lost"
|
||||||
|
android:layout_toLeftOf="@+id/ll_right_lost"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_title_lost"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/record_lost_item_title"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_desc_lost"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/white_alpha_99"
|
||||||
|
android:text="@string/record_lost_item_desc"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/ll_right_lost"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:background="@mipmap/bg_record_lost_rgiht"
|
||||||
|
android:gravity="center"
|
||||||
|
>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_lost_right_top"
|
||||||
|
android:layout_width="75dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/gray9"
|
||||||
|
android:text="@string/not_win"
|
||||||
|
/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:id="@+id/content_root" >
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_date_win"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/gray6"
|
||||||
|
android:text="2025/10/31"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_records_win"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingVertical="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_left_win"
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:src="@mipmap/record_win"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_toRightOf="@+id/iv_left_win"
|
||||||
|
android:layout_toLeftOf="@+id/ll_right_win"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_title_win"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/record_win_item_title"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_desc_win"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/white_alpha_99"
|
||||||
|
android:text="@string/record_win_item_desc"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_right_win"
|
||||||
|
android:layout_width="75dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:background="@mipmap/bg_record_win_rgiht"
|
||||||
|
android:paddingHorizontal="6dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_win_right_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/yellow_00"
|
||||||
|
android:text="Ganhar"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_win_right_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="11dp"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textColor="@color/green_54"
|
||||||
|
android:text="Ver detalhes"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/ll_right_lost"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:background="@mipmap/bg_record_lost_rgiht"
|
||||||
|
android:gravity="center"
|
||||||
|
>
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_lost_right_top"
|
||||||
|
android:layout_width="75dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="@color/gray9"
|
||||||
|
android:text="@string/not_win"
|
||||||
|
/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -120,5 +120,6 @@
|
||||||
<string name="participar_ed">Já participou</string>
|
<string name="participar_ed">Já participou</string>
|
||||||
<string name="remain_time">Reembolso em</string>
|
<string name="remain_time">Reembolso em</string>
|
||||||
<string name="has_joined_zerobuy">You have participated this activity.</string>
|
<string name="has_joined_zerobuy">You have participated this activity.</string>
|
||||||
|
<string name="no_data_hint">There\'s no any record</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue