Skip to content

Commit

Permalink
feat: added color in the progress bar when the state is critical
Browse files Browse the repository at this point in the history
  • Loading branch information
joragua committed Nov 14, 2024
1 parent 0bace11 commit 571c132
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ class ManageAccountsAdapter(
}

else -> { // Limited storage. Value under 100%
if (userQuota.state == UserQuotaState.CRITICAL) {
quotaBar.apply {
progressTintList = ColorStateList.valueOf(resources.getColor(R.color.quota_exceeded))
}
}
quotaBar.progress = userQuota.getRelative().toInt()
quotaText.text = String.format(
context.getString(R.string.manage_accounts_quota),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ abstract class DrawerActivity : ToolbarActivity() {
getAccountQuotaBar()?.apply {
isVisible = true
progress = userQuota.getRelative().toInt()
progressTintList = ColorStateList.valueOf(resources.getColor(R.color.color_accent))
progressTintList = ColorStateList.valueOf(resources.getColor(R.color.quota_exceeded))
}
getAccountQuotaText()?.apply {
text = String.format(
Expand Down

0 comments on commit 571c132

Please sign in to comment.