summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-03-27 16:22:40 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-27 16:10:24 +0200
commit4fcb8c47923a6ef76d606ca03aebf2a8531136fa (patch)
tree40cdec3d885d20f8070eb2d9c41f63080ca3fd84 /ui/src/main/java/com/wireguard
parentfb05b358c07d8dca44ee472dbd0edbfa0a564336 (diff)
ui: introduce a fresh set of Material3 themes and migrate to them
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/java/com/wireguard')
-rw-r--r--ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt3
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt6
2 files changed, 3 insertions, 6 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
index fe75be35..2493d281 100644
--- a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
+++ b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
@@ -40,6 +40,7 @@ import com.wireguard.android.R
import com.wireguard.android.databinding.LogViewerActivityBinding
import com.wireguard.android.util.DownloadsFileSaver
import com.wireguard.android.util.ErrorMessages
+import com.wireguard.android.util.resolveAttribute
import com.wireguard.crypto.KeyPair
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -70,7 +71,7 @@ class LogViewerActivity : AppCompatActivity() {
yearFormatter.format(Date())
}
- private val defaultColor by lazy { ResourcesCompat.getColor(resources, R.color.primary_text_color, theme) }
+ private val defaultColor by lazy { ResourcesCompat.getColor(resources, resolveAttribute(com.google.android.material.R.attr.colorOnSurface), theme) }
private val debugColor by lazy { ResourcesCompat.getColor(resources, R.color.debug_tag_color, theme) }
diff --git a/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt b/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt
index f54f88f2..78b9f3d7 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt
@@ -34,10 +34,6 @@ class AddTunnelsSheet : BottomSheetDialogFragment() {
}
}
- override fun getTheme(): Int {
- return R.style.BottomSheetDialogTheme
- }
-
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
if (savedInstanceState != null) dismiss()
val view = inflater.inflate(R.layout.add_tunnels_bottom_sheet, container, false)
@@ -76,7 +72,7 @@ class AddTunnelsSheet : BottomSheetDialogFragment() {
}
})
val gradientDrawable = GradientDrawable().apply {
- setColor(requireContext().resolveAttribute(R.attr.colorBackground))
+ setColor(requireContext().resolveAttribute(com.google.android.material.R.attr.colorSurface))
}
view.background = gradientDrawable
}