Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
R
reelshort white
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
reelshort white
Commits
9ccd802a
Commit
9ccd802a
authored
Jan 20, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
ae458d70
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
229 additions
and
2 deletions
+229
-2
CheckInBean.kt
app/src/main/java/com/base/appzxhy/bean/CheckInBean.kt
+9
-0
CheckInkAdapter.kt
.../main/java/com/base/appzxhy/ui/adapter/CheckInkAdapter.kt
+23
-0
RewardsFragment.kt
...src/main/java/com/base/appzxhy/ui/main/RewardsFragment.kt
+26
-0
bg_5f3f32_5.xml
app/src/main/res/drawable/bg_5f3f32_5.xml
+5
-0
bg_6d3c06_ff9771.xml
app/src/main/res/drawable/bg_6d3c06_ff9771.xml
+10
-0
fragment_rewards.xml
app/src/main/res/layout/fragment_rewards.xml
+120
-2
item_day_balance.xml
app/src/main/res/layout/item_day_balance.xml
+36
-0
jiantou_balance.png
app/src/main/res/mipmap-xxhdpi/jiantou_balance.png
+0
-0
r_btn_s.png
app/src/main/res/mipmap-xxhdpi/r_btn_s.png
+0
-0
r_dajinbi.png
app/src/main/res/mipmap-xxhdpi/r_dajinbi.png
+0
-0
r_day.png
app/src/main/res/mipmap-xxhdpi/r_day.png
+0
-0
re_lihetu.png
app/src/main/res/mipmap-xxhdpi/re_lihetu.png
+0
-0
No files found.
app/src/main/java/com/base/appzxhy/bean/CheckInBean.kt
0 → 100644
View file @
9ccd802a
package
com.base.appzxhy.bean
data class
CheckInBean
(
val
day
:
Int
=
1
,
val
dayDesc
:
String
,
val
balance
:
Int
,
)
{
var
checked
:
Boolean
=
false
}
\ No newline at end of file
app/src/main/java/com/base/appzxhy/ui/adapter/CheckInkAdapter.kt
0 → 100644
View file @
9ccd802a
package
com.base.appzxhy.ui.adapter
import
android.content.Context
import
android.view.ViewGroup
import
com.base.appzxhy.R
import
com.base.appzxhy.bean.CheckInBean
import
com.base.appzxhy.databinding.ItemDayBalanceBinding
import
com.base.appzxhy.utils.XmlEx.inflate
import
com.chad.library.adapter4.BaseQuickAdapter
class
CheckInkAdapter
:
BaseQuickAdapter
<
CheckInBean
,
CommonViewHolder
>()
{
override
fun
onBindViewHolder
(
holder
:
CommonViewHolder
,
position
:
Int
,
item
:
CheckInBean
?)
{
val
binding
=
ItemDayBalanceBinding
.
bind
(
holder
.
itemView
)
}
override
fun
onCreateViewHolder
(
context
:
Context
,
parent
:
ViewGroup
,
viewType
:
Int
):
CommonViewHolder
{
return
CommonViewHolder
(
R
.
layout
.
item_day_balance
.
inflate
(
parent
))
}
}
\ No newline at end of file
app/src/main/java/com/base/appzxhy/ui/main/RewardsFragment.kt
View file @
9ccd802a
package
com.base.appzxhy.ui.main
import
androidx.core.view.updatePadding
import
com.base.appzxhy.base.BaseFragment
import
com.base.appzxhy.bean.CheckInBean
import
com.base.appzxhy.databinding.FragmentRewardsBinding
import
com.base.appzxhy.utils.BarUtils
class
RewardsFragment
:
BaseFragment
<
FragmentRewardsBinding
>(
FragmentRewardsBinding
::
inflate
)
{
override
fun
initView
()
{
super
.
initView
()
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
initCheckInAdapter
()
}
private
fun
initCheckInAdapter
()
{
val
list
=
listOf
(
CheckInBean
(
1
,
"Today"
,
10
).
apply
{
checked
=
true
},
CheckInBean
(
2
,
"Days2"
,
10
).
apply
{
checked
=
true
},
CheckInBean
(
3
,
"Days3"
,
10
).
apply
{
checked
=
true
},
CheckInBean
(
4
,
"Days4"
,
20
).
apply
{
checked
=
true
},
CheckInBean
(
5
,
"Days5"
,
25
),
CheckInBean
(
6
,
"Days6"
,
30
),
CheckInBean
(
7
,
"Days7"
,
50
),
)
// binding.rv.adapter =
}
override
fun
initListener
()
{
super
.
initListener
()
}
}
\ No newline at end of file
app/src/main/res/drawable/bg_5f3f32_5.xml
0 → 100644
View file @
9ccd802a
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#5F3F32"
/>
<corners
android:radius=
"5dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_6d3c06_ff9771.xml
0 → 100644
View file @
9ccd802a
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"-90"
android:endColor=
"#4dff9771"
android:startColor=
"#4d6d3c06"
/>
<corners
android:radius=
"10dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_rewards.xml
View file @
9ccd802a
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/black"
android:orientation=
"vertical"
tools:context=
".ui.main.RewardsFragment"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
</FrameLayout>
\ No newline at end of file
<ImageView
android:id=
"@+id/ivBalance"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"42dp"
android:src=
"@mipmap/r_dajinbi"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tvBalance"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"5dp"
android:gravity=
"center"
android:includeFontPadding=
"false"
android:minWidth=
"50dp"
android:text=
"0"
android:textColor=
"#FFAF8C"
android:textSize=
"36sp"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"@id/ivBalance"
app:layout_constraintStart_toEndOf=
"@id/ivBalance"
app:layout_constraintTop_toTopOf=
"@id/ivBalance"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"@id/tvBalance"
app:layout_constraintStart_toStartOf=
"@id/ivBalance"
app:layout_constraintTop_toBottomOf=
"@id/ivBalance"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:includeFontPadding=
"false"
android:text=
"Balance"
android:textColor=
"#FFAF8C"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:src=
"@mipmap/jiantou_balance"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/ivlihe"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/re_lihetu"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"16dp"
android:layout_marginTop=
"-45dp"
android:background=
"@drawable/bg_6d3c06_ff9771"
android:minHeight=
"160dp"
android:orientation=
"vertical"
app:layout_constraintTop_toBottomOf=
"@id/ivlihe"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"12dp"
android:text=
"Check-in Streak: 0 day(s)"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginTop=
"10dp"
android:overScrollMode=
"never"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
app:spanCount=
"7"
tools:ignore=
"SpeakableTextPresentCheck"
tools:listitem=
"@layout/item_day_balance"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:layout_marginHorizontal=
"16dp"
android:layout_marginTop=
"16dp"
android:layout_marginBottom=
"12dp"
android:background=
"@mipmap/r_btn_s"
android:gravity=
"center"
android:text=
"Check in"
android:textColor=
"#781A03"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_day_balance.xml
0 → 100644
View file @
9ccd802a
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"2dp"
android:background=
"@drawable/bg_5f3f32_5"
>
<TextView
android:id=
"@+id/tvDay"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal|top"
android:layout_marginTop=
"2dp"
android:includeFontPadding=
"false"
android:text=
"Today"
android:textColor=
"#FFE8C3"
android:textSize=
"12sp"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:src=
"@mipmap/r_day"
/>
<TextView
android:id=
"@+id/tvBalance"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal|bottom"
android:layout_marginBottom=
"2dp"
android:includeFontPadding=
"false"
android:text=
"+10"
android:textColor=
"#FFE8C3"
android:textSize=
"12sp"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/jiantou_balance.png
0 → 100644
View file @
9ccd802a
615 Bytes
app/src/main/res/mipmap-xxhdpi/r_btn_s.png
0 → 100644
View file @
9ccd802a
18.7 KB
app/src/main/res/mipmap-xxhdpi/r_dajinbi.png
0 → 100644
View file @
9ccd802a
16.5 KB
app/src/main/res/mipmap-xxhdpi/r_day.png
0 → 100644
View file @
9ccd802a
3.94 KB
app/src/main/res/mipmap-xxhdpi/re_lihetu.png
0 → 100644
View file @
9ccd802a
152 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment