File tree Expand file tree Collapse file tree 4 files changed +26
-26
lines changed
domain/usagestats/src/main/java/com/hmh/hamyeonham/usagestats/usecase
java/com/hmh/hamyeonham/feature/main/home Expand file tree Collapse file tree 4 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ class UsageStaticsTotalViewHolder(
2626
2727 private fun bindUsageStaticsInfo (totalModel : HomeItem .TotalModel ) {
2828 binding.run {
29- // val totalTimeLeft =
30- // if (totalModel.totalGoalTime > totalModel.totalTimeInForeground) totalModel.totalGoalTime - totalModel.totalTimeInForeground else 0
31- //
32- // tvTotalTimeLeft.text =
33- // context.getSecondStrColoredString(
34- // firstStr = convertMillisecondToString(totalTimeLeft),
35- // secondStr = getString(context, R.string.all_left),
36- // color = com.hmh.hamyeonham.core.designsystem.R.color.gray1,
37- // )
29+ val totalTimeLeft =
30+ if (totalModel.totalGoalTime > totalModel.totalTimeInForeground) totalModel.totalGoalTime - totalModel.totalTimeInForeground else 0
31+
32+ tvTotalTimeLeft.text =
33+ context.getSecondStrColoredString(
34+ firstStr = convertMillisecondToString(totalTimeLeft),
35+ secondStr = getString(context, R .string.all_left),
36+ color = com.hmh.hamyeonham.core.designsystem.R .color.gray1,
37+ )
3838
3939 tvTotalUsage.text =
4040 context.getString(
Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ class UsageStaticsViewHolder(
4040 binding.run {
4141 pbAppUsage.progress = usageStatusAndGoal.usedPercentage
4242 tvGoalTime.text = convertTimeToString(usageStatusAndGoal.goalTimeInMinute)
43- // tvAppTimeLeft.text =
44- // context.getSecondStrColoredString(
45- // firstStr = convertTimeToString(usageStatusAndGoal.timeLeftInMinute),
46- // secondStr = getString(context, R.string.all_left),
47- // color = com.hmh.hamyeonham.core.designsystem.R.color.gray1,
48- // )
43+ tvAppTimeLeft.text =
44+ context.getSecondStrColoredString(
45+ firstStr = convertTimeToString(usageStatusAndGoal.timeLeftInMinute),
46+ secondStr = getString(context, R .string.all_left),
47+ color = com.hmh.hamyeonham.core.designsystem.R .color.gray1,
48+ )
4949 }
5050 }
5151}
Original file line number Diff line number Diff line change 5353 app : layout_constraintBottom_toBottomOf =" @id/iv_appicon"
5454 app : layout_constraintStart_toStartOf =" @id/tv_appname" />
5555
56- <!-- <TextView-->
57- <!-- android:id="@+id/tv_app_time_left"-->
58- <!-- android:layout_width="wrap_content"-->
59- <!-- android:layout_height="wrap_content"-->
60- <!-- android:layout_marginEnd="20dp"-->
61- <!-- tools:text="1시간 남음"-->
62- <!-- android:textAppearance="?textAppearanceTitleMedium"-->
63- <!-- android:textColor="?white_text"-->
64- <!-- app:layout_constraintBottom_toBottomOf="@id/pb_app_usage"-->
65- <!-- app:layout_constraintEnd_toEndOf="@id/pb_app_usage"-->
66- <!-- app:layout_constraintTop_toTopOf="@id/pb_app_usage" /> -- >
56+ <TextView
57+ android : id =" @+id/tv_app_time_left"
58+ android : layout_width =" wrap_content"
59+ android : layout_height =" wrap_content"
60+ android : layout_marginEnd =" 20dp"
61+ tools : text =" 1시간 남음"
62+ android : textAppearance =" ?textAppearanceTitleMedium"
63+ android : textColor =" ?white_text"
64+ app : layout_constraintBottom_toBottomOf =" @id/pb_app_usage"
65+ app : layout_constraintEnd_toEndOf =" @id/pb_app_usage"
66+ app : layout_constraintTop_toTopOf =" @id/pb_app_usage" />
6767
6868</androidx .constraintlayout.widget.ConstraintLayout>
You can’t perform that action at this time.
0 commit comments