Switch to Material3 theme

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2023-04-30 11:01:42 +05:30
parent aad9395d50
commit 5a7615691b
7 changed files with 38 additions and 19 deletions

View File

@@ -22,6 +22,7 @@ package com.aurora.store
import android.Manifest
import android.content.Intent
import android.content.res.ColorStateList
import android.os.Build
import android.os.Bundle
import android.os.Environment
@@ -158,7 +159,11 @@ class MainActivity : BaseActivity() {
bottomNavigationView.setupWithNavController(navController)
val backGroundColor = getStyledAttributeColor(android.R.attr.colorBackground)
bottomNavigationView.setBackgroundColor(ColorUtils.setAlphaComponent(backGroundColor, 245))
bottomNavigationView.apply {
setBackgroundColor(ColorUtils.setAlphaComponent(backGroundColor, 245))
val alphaColor = ColorUtils.setAlphaComponent(this@MainActivity.accentColor(), 100)
itemActiveIndicatorColor = ColorStateList.valueOf(alphaColor)
}
val defaultTab = Preferences.getInteger(this, Preferences.PREFERENCE_DEFAULT_SELECTED_TAB)
val navigationList =

View File

@@ -45,7 +45,7 @@ abstract class BaseBottomSheet : BottomSheetDialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val bottomSheetDialog = BottomSheetDialog(
requireContext(),
R.style.Aurora_BottomSheetDialog
R.style.Theme_Material3_DayNight_BottomSheetDialog
)
VM = SheetBaseBinding.inflate(layoutInflater)
@@ -80,4 +80,4 @@ abstract class BaseBottomSheet : BottomSheetDialogFragment() {
): View?
abstract fun onContentViewCreated(view: View, savedInstanceState: Bundle?)
}
}