Skip to content

Commit 12f0b37

Browse files
committed
Properly resolve color attribute
1 parent f500cb1 commit 12f0b37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/lib/src/main/java/org/calyxos/backup/storage/ui/restore/SnapshotFragment.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import android.widget.TextView
1616
import androidx.fragment.app.Fragment
1717
import androidx.lifecycle.LiveData
1818
import androidx.recyclerview.widget.RecyclerView
19+
import com.google.android.material.color.MaterialColors
1920
import org.calyxos.backup.storage.R
2021
import org.calyxos.backup.storage.api.SnapshotItem
2122
import org.calyxos.backup.storage.api.SnapshotResult
@@ -57,7 +58,7 @@ public abstract class SnapshotFragment : Fragment(), SnapshotClickListener {
5758
}
5859

5960
is SnapshotResult.Error -> {
60-
val color = resources.getColor(R.color.design_default_color_error, null)
61+
val color = MaterialColors.getColor(emptyStateView, R.attr.colorError)
6162
emptyStateView.setTextColor(color)
6263
emptyStateView.setText(R.string.snapshots_error)
6364
emptyStateView.visibility = VISIBLE

0 commit comments

Comments
 (0)