Material 3 - WIP

pull/3385/head
Alex Baker 10 months ago
parent 759b418dfb
commit ba66deaddc

@ -207,7 +207,9 @@
android:taskAffinity="" android:taskAffinity=""
android:theme="@style/TranslucentDialog"/> android:theme="@style/TranslucentDialog"/>
<activity android:name=".location.LocationPickerActivity"/> <activity
android:name=".location.LocationPickerActivity"
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar" />
<activity <activity
android:exported="true" android:exported="true"

@ -5,6 +5,7 @@
*/ */
package com.todoroo.astrid.activity package com.todoroo.astrid.activity
import android.app.ActivityOptions
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
@ -21,12 +22,13 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.material3.DrawerValue import androidx.compose.material3.DrawerValue
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
@ -50,6 +52,8 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.core.content.IntentCompat.getParcelableExtra import androidx.core.content.IntentCompat.getParcelableExtra
@ -64,10 +68,8 @@ import com.todoroo.astrid.adapter.SubheaderClickHandler
import com.todoroo.astrid.dao.TaskDao import com.todoroo.astrid.dao.TaskDao
import com.todoroo.astrid.service.TaskCreator import com.todoroo.astrid.service.TaskCreator
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.tasks.BuildConfig import org.tasks.BuildConfig
import org.tasks.R import org.tasks.R
import org.tasks.TasksApplication import org.tasks.TasksApplication
@ -89,10 +91,8 @@ import org.tasks.data.entity.Task
import org.tasks.data.listSettingsClass import org.tasks.data.listSettingsClass
import org.tasks.dialogs.NewFilterDialog import org.tasks.dialogs.NewFilterDialog
import org.tasks.dialogs.WhatsNewDialog import org.tasks.dialogs.WhatsNewDialog
import org.tasks.extensions.Context.findActivity
import org.tasks.extensions.Context.nightMode import org.tasks.extensions.Context.nightMode
import org.tasks.extensions.Context.openUri import org.tasks.extensions.Context.openUri
import org.tasks.extensions.hideKeyboard
import org.tasks.filters.Filter import org.tasks.filters.Filter
import org.tasks.filters.FilterProvider import org.tasks.filters.FilterProvider
import org.tasks.filters.FilterProvider.Companion.REQUEST_NEW_LIST import org.tasks.filters.FilterProvider.Companion.REQUEST_NEW_LIST
@ -100,6 +100,8 @@ import org.tasks.filters.FilterProvider.Companion.REQUEST_NEW_PLACE
import org.tasks.filters.FilterProvider.Companion.REQUEST_NEW_TAGS import org.tasks.filters.FilterProvider.Companion.REQUEST_NEW_TAGS
import org.tasks.filters.NavigationDrawerSubheader import org.tasks.filters.NavigationDrawerSubheader
import org.tasks.filters.PlaceFilter import org.tasks.filters.PlaceFilter
import org.tasks.kmp.org.tasks.compose.TouchSlopMultiplier
import org.tasks.kmp.org.tasks.compose.rememberImeState
import org.tasks.location.LocationPickerActivity import org.tasks.location.LocationPickerActivity
import org.tasks.location.LocationPickerActivity.Companion.EXTRA_PLACE import org.tasks.location.LocationPickerActivity.Companion.EXTRA_PLACE
import org.tasks.preferences.DefaultFilterProvider import org.tasks.preferences.DefaultFilterProvider
@ -137,7 +139,7 @@ class MainActivity : AppCompatActivity() {
*/ */
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
theme.applyTheme(this) theme.themeBase.set(this)
currentNightMode = nightMode currentNightMode = nightMode
currentPro = inventory.hasPro currentPro = inventory.hasPro
@ -153,8 +155,6 @@ class MainActivity : AppCompatActivity() {
) )
setContent { setContent {
val windowInsets = WindowInsets.systemBars.asPaddingValues()
TasksTheme(theme = theme.themeBase.index) { TasksTheme(theme = theme.themeBase.index) {
val drawerState = rememberDrawerState( val drawerState = rememberDrawerState(
initialValue = DrawerValue.Closed, initialValue = DrawerValue.Closed,
@ -164,259 +164,283 @@ class MainActivity : AppCompatActivity() {
} }
) )
val state = viewModel.state.collectAsStateWithLifecycle().value val state = viewModel.state.collectAsStateWithLifecycle().value
val currentWindowInsets = WindowInsets.systemBars.asPaddingValues()
ModalNavigationDrawer( val windowInsets = remember { mutableStateOf(currentWindowInsets) }
drawerState = drawerState, val keyboard = LocalSoftwareKeyboardController.current
drawerContent = {
ModalDrawerSheet( LaunchedEffect(currentWindowInsets) {
drawerState = drawerState, Timber.d("insets: $currentWindowInsets")
windowInsets = WindowInsets(0, 0, 0, 0), if (currentWindowInsets.calculateTopPadding() != 0.dp || currentWindowInsets.calculateBottomPadding() != 0.dp) {
) { windowInsets.value = currentWindowInsets
val context = LocalContext.current }
val settingsRequest = rememberLauncherForActivityResult( }
ActivityResultContracts.StartActivityForResult() val navigator = rememberListDetailPaneScaffoldNavigator(
calculatePaneScaffoldDirective(
windowAdaptiveInfo = currentWindowAdaptiveInfo(),
verticalHingePolicy = HingePolicy.AlwaysAvoid,
).copy(
horizontalPartitionSpacerSize = 0.dp,
verticalPartitionSpacerSize = 0.dp,
)
)
val isListVisible =
navigator.scaffoldValue[ListDetailPaneScaffoldRole.List] == PaneAdaptedValue.Expanded
val isDetailVisible =
navigator.scaffoldValue[ListDetailPaneScaffoldRole.Detail] == PaneAdaptedValue.Expanded
TouchSlopMultiplier {
ModalNavigationDrawer(
drawerState = drawerState,
gesturesEnabled = isListVisible,
drawerContent = {
ModalDrawerSheet(
drawerState = drawerState,
windowInsets = WindowInsets(0, 0, 0, 0),
) { ) {
context.findActivity()?.recreate() val context = LocalContext.current
} val settingsRequest = rememberLauncherForActivityResult(
val scope = rememberCoroutineScope() ActivityResultContracts.StartActivityForResult()
val bottomSearchBar = atLeastR() ) {
TaskListDrawer( // Activity.recreate caused window inset problems
arrangement = when { restartActivity()
state.menuQuery.isBlank() -> Arrangement.Top }
bottomSearchBar -> Arrangement.Bottom val scope = rememberCoroutineScope()
else -> Arrangement.Top val bottomSearchBar = atLeastR()
}, TaskListDrawer(
bottomSearchBar = bottomSearchBar, arrangement = when {
filters = if (state.menuQuery.isNotEmpty()) state.searchItems else state.drawerItems, state.menuQuery.isBlank() -> Arrangement.Top
onClick = { bottomSearchBar -> Arrangement.Bottom
when (it) { else -> Arrangement.Top
is DrawerItem.Filter -> { },
viewModel.setFilter(it.filter) bottomSearchBar = bottomSearchBar,
scope.launch(Dispatchers.Default) { filters = if (state.menuQuery.isNotEmpty()) state.searchItems else state.drawerItems,
withContext(Dispatchers.Main) { onClick = {
context.findActivity()?.hideKeyboard() when (it) {
is DrawerItem.Filter -> {
viewModel.setFilter(it.filter)
scope.launch {
drawerState.close()
keyboard?.hide()
} }
drawerState.close()
} }
}
is DrawerItem.Header -> { is DrawerItem.Header -> {
viewModel.toggleCollapsed(it.header) viewModel.toggleCollapsed(it.header)
}
} }
} },
}, onAddClick = {
onAddClick = { scope.launch {
scope.launch(Dispatchers.Default) { drawerState.close()
drawerState.close() when (it.header.addIntentRc) {
when (it.header.addIntentRc) { FilterProvider.REQUEST_NEW_FILTER ->
FilterProvider.REQUEST_NEW_FILTER -> NewFilterDialog.newFilterDialog().show(
NewFilterDialog.newFilterDialog().show( supportFragmentManager,
supportFragmentManager, SubheaderClickHandler.FRAG_TAG_NEW_FILTER
SubheaderClickHandler.FRAG_TAG_NEW_FILTER )
)
REQUEST_NEW_PLACE ->
REQUEST_NEW_PLACE -> startActivityForResult(
startActivityForResult( Intent(
Intent( this@MainActivity,
this@MainActivity, LocationPickerActivity::class.java
LocationPickerActivity::class.java ),
), REQUEST_NEW_PLACE
REQUEST_NEW_PLACE )
)
REQUEST_NEW_TAGS ->
REQUEST_NEW_TAGS -> startActivityForResult(
startActivityForResult( Intent(
Intent( this@MainActivity,
this@MainActivity, TagSettingsActivity::class.java
TagSettingsActivity::class.java ),
), REQUEST_NEW_LIST
REQUEST_NEW_LIST )
)
REQUEST_NEW_LIST -> {
REQUEST_NEW_LIST -> { val account =
val account = caldavDao.getAccount(it.header.id.toLong())
caldavDao.getAccount(it.header.id.toLong()) ?: return@launch
?: return@launch when (it.header.subheaderType) {
when (it.header.subheaderType) { NavigationDrawerSubheader.SubheaderType.CALDAV,
NavigationDrawerSubheader.SubheaderType.CALDAV, NavigationDrawerSubheader.SubheaderType.TASKS,
NavigationDrawerSubheader.SubheaderType.TASKS, ->
-> startActivityForResult(
startActivityForResult( Intent(
Intent( this@MainActivity,
this@MainActivity, account.listSettingsClass()
account.listSettingsClass() )
.putExtra(
EXTRA_CALDAV_ACCOUNT,
account
),
REQUEST_NEW_LIST
) )
.putExtra(
EXTRA_CALDAV_ACCOUNT, else -> {}
account }
),
REQUEST_NEW_LIST
)
else -> {}
} }
}
else -> Timber.e("Unhandled request code: $it") else -> Timber.e("Unhandled request code: $it")
}
} }
} },
}, onErrorClick = {
onErrorClick = { context.startActivity(Intent(context, MainPreferences::class.java))
context.startActivity(Intent(context, MainPreferences::class.java)) },
}, searchBar = {
searchBar = { MenuSearchBar(
MenuSearchBar( begForMoney = state.begForMoney,
begForMoney = state.begForMoney, onDrawerAction = {
onDrawerAction = { scope.launch {
scope.launch { drawerState.close()
drawerState.close() when (it) {
when (it) { DrawerAction.PURCHASE ->
DrawerAction.PURCHASE -> if (TasksApplication.IS_GENERIC)
if (TasksApplication.IS_GENERIC) context.openUri(R.string.url_donate)
context.openUri(R.string.url_donate) else
else context.startActivity(
context.startActivity( Intent(
context,
PurchaseActivity::class.java
)
)
DrawerAction.SETTINGS ->
settingsRequest.launch(
Intent( Intent(
context, context,
PurchaseActivity::class.java MainPreferences::class.java
) )
) )
DrawerAction.SETTINGS -> DrawerAction.HELP_AND_FEEDBACK ->
settingsRequest.launch( context.startActivity(
Intent( Intent(
context, context,
MainPreferences::class.java HelpAndFeedback::class.java
) )
)
DrawerAction.HELP_AND_FEEDBACK ->
context.startActivity(
Intent(
context,
HelpAndFeedback::class.java
) )
) }
} }
} },
}, query = state.menuQuery,
query = state.menuQuery, onQueryChange = { viewModel.queryMenu(it) },
onQueryChange = { viewModel.queryMenu(it) }, )
) },
}, )
) }
} }
} ) {
) { val scope = rememberCoroutineScope()
val navigator = rememberListDetailPaneScaffoldNavigator(
calculatePaneScaffoldDirective(
windowAdaptiveInfo = currentWindowAdaptiveInfo(),
verticalHingePolicy = HingePolicy.AlwaysAvoid,
).copy(
horizontalPartitionSpacerSize = 0.dp,
verticalPartitionSpacerSize = 0.dp,
),
) LaunchedEffect(state.task) {
val isListVisible = if (state.task == null) {
navigator.scaffoldValue[ListDetailPaneScaffoldRole.List] == PaneAdaptedValue.Expanded if (intent.finishAffinity) {
val isDetailVisible = finishAffinity()
navigator.scaffoldValue[ListDetailPaneScaffoldRole.Detail] == PaneAdaptedValue.Expanded } else {
val scope = rememberCoroutineScope() if (intent.removeTask && intent.broughtToFront) {
moveTaskToBack(true)
LaunchedEffect(state.task) { }
if (state.task == null) { keyboard?.hide()
navigator.navigateTo(pane = ThreePaneScaffoldRole.Secondary)
}
} else {
navigator.navigateTo(pane = ThreePaneScaffoldRole.Primary)
}
}
BackHandler(enabled = state.task == null) {
Timber.d("onBackPressed")
if (intent.finishAffinity) { if (intent.finishAffinity) {
finishAffinity() finishAffinity()
} else if (isDetailVisible && navigator.canNavigateBack()) {
scope.launch {
navigator.navigateBack()
}
} else { } else {
if (intent.removeTask && intent.broughtToFront) { finish()
moveTaskToBack(true) if (!preferences.getBoolean(R.string.p_open_last_viewed_list, true)) {
runBlocking {
viewModel.resetFilter()
}
} }
hideKeyboard()
navigator.navigateTo(pane = ThreePaneScaffoldRole.Secondary)
} }
} else {
navigator.navigateTo(pane = ThreePaneScaffoldRole.Primary)
} }
} LaunchedEffect(state.filter, state.task) {
actionMode?.finish()
BackHandler(enabled = state.task == null) { actionMode = null
Timber.d("onBackPressed") if (state.task == null) {
if (intent.finishAffinity) { keyboard?.hide()
finishAffinity()
} else if (isDetailVisible && navigator.canNavigateBack()) {
scope.launch {
navigator.navigateBack()
}
} else {
finish()
if (!preferences.getBoolean(R.string.p_open_last_viewed_list, true)) {
runBlocking {
viewModel.resetFilter()
}
} }
drawerState.close()
} }
} ListDetailPaneScaffold(
LaunchedEffect(state.filter, state.task) { directive = navigator.scaffoldDirective,
actionMode?.finish() value = navigator.scaffoldValue,
actionMode = null listPane = {
drawerState.close() key (state.filter) {
} val fragment = remember { mutableStateOf<TaskListFragment?>(null) }
ListDetailPaneScaffold( AndroidFragment<TaskListFragment>(
directive = navigator.scaffoldDirective, fragmentState = rememberFragmentState(),
value = navigator.scaffoldValue, arguments = remember(state.filter) {
listPane = { Bundle()
key (state.filter) { .apply { putParcelable(EXTRA_FILTER, state.filter) }
val fragment = remember { mutableStateOf<TaskListFragment?>(null) } },
AndroidFragment<TaskListFragment>( modifier = Modifier.fillMaxSize(),
fragmentState = rememberFragmentState(), ) { tlf ->
arguments = remember(state.filter) { fragment.value = tlf
Bundle() tlf.applyInsets(windowInsets.value)
.apply { putParcelable(EXTRA_FILTER, state.filter) } tlf.setNavigationClickListener {
}, scope.launch { drawerState.open() }
modifier = Modifier.fillMaxSize(), }
) { tlf ->
fragment.value = tlf
tlf.setNavigationClickListener {
scope.launch { drawerState.open() }
} }
} LaunchedEffect(fragment, windowInsets) {
LaunchedEffect(fragment, windowInsets) { fragment.value?.applyInsets(windowInsets.value)
fragment.value?.applyInsets(windowInsets)
}
}
},
detailPane = {
Box(
modifier = Modifier
.fillMaxSize()
.padding(windowInsets),
contentAlignment = Alignment.Center,
) {
if (state.task == null) {
if (isListVisible && isDetailVisible) {
Icon(
painter = painterResource(org.tasks.kmp.R.drawable.ic_launcher_no_shadow_foreground),
contentDescription = null,
modifier = Modifier.size(192.dp),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
} }
} else { }
key(state.task) { },
AndroidFragment<TaskEditFragment>( detailPane = {
fragmentState = rememberFragmentState(), val direction = LocalLayoutDirection.current
arguments = remember(state.task) { Box(
Bundle() modifier = Modifier
.apply { putParcelable(EXTRA_TASK, state.task) } .fillMaxSize()
}, .padding(
modifier = Modifier.fillMaxSize(), top = windowInsets.value.calculateTopPadding(),
) start = windowInsets.value.calculateStartPadding(direction),
end = windowInsets.value.calculateEndPadding(direction),
bottom = if (rememberImeState().value)
WindowInsets.ime.asPaddingValues().calculateBottomPadding()
else
windowInsets.value.calculateBottomPadding()
),
contentAlignment = Alignment.Center,
) {
if (state.task == null) {
if (isListVisible && isDetailVisible) {
Icon(
painter = painterResource(org.tasks.kmp.R.drawable.ic_launcher_no_shadow_foreground),
contentDescription = null,
modifier = Modifier.size(192.dp),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
} else {
key(state.task) {
AndroidFragment<TaskEditFragment>(
fragmentState = rememberFragmentState(),
arguments = remember(state.task) {
Bundle()
.apply { putParcelable(EXTRA_TASK, state.task) }
},
modifier = Modifier.fillMaxSize(),
)
}
} }
} }
} },
}, )
) }
} }
} }
} }
@ -501,7 +525,7 @@ class MainActivity : AppCompatActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (currentNightMode != nightMode || currentPro != inventory.hasPro) { if (currentNightMode != nightMode || currentPro != inventory.hasPro) {
recreate() restartActivity()
return return
} }
if (preferences.getBoolean(R.string.p_just_updated, false)) { if (preferences.getBoolean(R.string.p_just_updated, false)) {
@ -520,6 +544,17 @@ class MainActivity : AppCompatActivity() {
actionMode = mode actionMode = mode
} }
private fun restartActivity() {
finish()
startActivity(
Intent(this, MainActivity::class.java),
ActivityOptions.makeCustomAnimation(
this@MainActivity,
android.R.anim.fade_in, android.R.anim.fade_out
).toBundle()
)
}
companion object { companion object {
/** For indicating the new list screen should be launched at fragment setup time */ /** For indicating the new list screen should be launched at fragment setup time */
const val OPEN_FILTER = "open_filter" // $NON-NLS-1$ const val OPEN_FILTER = "open_filter" // $NON-NLS-1$

@ -69,7 +69,6 @@ class MainActivityViewModel @Inject constructor(
) )
private val _drawerOpen = MutableStateFlow(false) private val _drawerOpen = MutableStateFlow(false)
val drawerOpen = _drawerOpen.asStateFlow()
private val _updateFilters = MutableStateFlow(0L) private val _updateFilters = MutableStateFlow(0L)
private val _state = MutableStateFlow( private val _state = MutableStateFlow(

@ -7,7 +7,9 @@ import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
@ -23,7 +25,6 @@ import org.tasks.data.dao.UserActivityDao
import org.tasks.dialogs.DateTimePicker import org.tasks.dialogs.DateTimePicker
import org.tasks.dialogs.DialogBuilder import org.tasks.dialogs.DialogBuilder
import org.tasks.dialogs.Linkify import org.tasks.dialogs.Linkify
import org.tasks.extensions.hideKeyboard
import org.tasks.markdown.MarkdownProvider import org.tasks.markdown.MarkdownProvider
import org.tasks.notifications.NotificationManager import org.tasks.notifications.NotificationManager
import org.tasks.play.PlayServices import org.tasks.play.PlayServices
@ -63,6 +64,9 @@ class TaskEditFragment : Fragment() {
} }
} }
val context = LocalContext.current val context = LocalContext.current
val keyboard = LocalSoftwareKeyboardController.current
val scope = rememberCoroutineScope()
TaskEditScreen( TaskEditScreen(
editViewModel = editViewModel, editViewModel = editViewModel,
viewState = viewState, viewState = viewState,
@ -70,9 +74,12 @@ class TaskEditFragment : Fragment() {
.watchComments(viewState.task.uuid) .watchComments(viewState.task.uuid)
.collectAsStateWithLifecycle(emptyList()) .collectAsStateWithLifecycle(emptyList())
.value, .value,
save = { lifecycleScope.launch { save() } }, save = {
keyboard?.hide()
lifecycleScope.launch { save() }
},
discard = { discard = {
activity?.hideKeyboard() keyboard?.hide()
if (editViewModel.hasChanges()) { if (editViewModel.hasChanges()) {
dialogBuilder dialogBuilder
.newDialog(R.string.discard_confirmation) .newDialog(R.string.discard_confirmation)
@ -84,7 +91,7 @@ class TaskEditFragment : Fragment() {
} }
}, },
delete = { delete = {
activity?.hideKeyboard() keyboard?.hide()
dialogBuilder dialogBuilder
.newDialog(R.string.DLG_delete_this_task_question) .newDialog(R.string.DLG_delete_this_task_question)
.setPositiveButton(R.string.ok) { _, _ -> .setPositiveButton(R.string.ok) { _, _ ->

@ -6,10 +6,12 @@
package com.todoroo.astrid.activity package com.todoroo.astrid.activity
import android.Manifest import android.Manifest
import android.annotation.SuppressLint
import android.app.Activity.RESULT_OK import android.app.Activity.RESULT_OK
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
import android.speech.RecognizerIntent import android.speech.RecognizerIntent
@ -19,6 +21,7 @@ import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.ViewGroup.MarginLayoutParams
import androidx.activity.compose.BackHandler import androidx.activity.compose.BackHandler
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.StringRes import androidx.annotation.StringRes
@ -35,7 +38,6 @@ import androidx.compose.ui.platform.ViewCompositionStrategy
import androidx.core.app.ShareCompat import androidx.core.app.ShareCompat
import androidx.core.content.IntentCompat import androidx.core.content.IntentCompat
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.updatePadding import androidx.core.view.updatePadding
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
@ -273,26 +275,29 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
onClickMenu = onClick onClickMenu = onClick
} }
@SuppressLint("PrivateResource")
fun applyInsets(windowInsets: PaddingValues) { fun applyInsets(windowInsets: PaddingValues) {
val density = resources.displayMetrics.density val density = resources.displayMetrics.density
val actionBarHeight = TypedValue.complexToDimensionPixelSize( val topInset = (windowInsets.calculateTopPadding().value * density).toInt()
getData(requireContext(), android.R.attr.actionBarSize), val bottomInset = (windowInsets.calculateBottomPadding().value * density).toInt()
resources.displayMetrics if (topInset == 0 && bottomInset == 0) {
) Timber.d("$this: Ignoring insets")
return
} else {
Timber.d("$this: applying insets")
}
with(binding.toolbar) { with(binding.toolbar) {
val topInset = (windowInsets.calculateTopPadding().value * density).toInt() val actionBarHeight = TypedValue.complexToDimensionPixelSize(
getData(requireContext(), android.R.attr.actionBarSize),
resources.displayMetrics
)
val params = layoutParams val params = layoutParams
params.height = actionBarHeight + topInset params.height = actionBarHeight + topInset
layoutParams = params layoutParams = params
updatePadding(top = topInset) updatePadding(top = topInset)
} }
with(binding.bottomAppBar) { binding.bottomAppBar.updatePadding(bottom = bottomInset)
val bottomInset = (windowInsets.calculateBottomPadding().value * density).toInt() (binding.fab.layoutParams as MarginLayoutParams).bottomMargin = bottomInset / 2
val params = layoutParams
params.height = actionBarHeight + bottomInset
layoutParams = params
updatePadding(bottom = bottomInset)
}
} }
@OptIn(ExperimentalPermissionsApi::class) @OptIn(ExperimentalPermissionsApi::class)
@ -300,19 +305,6 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
binding = FragmentTaskListBinding.inflate(inflater, container, false) binding = FragmentTaskListBinding.inflate(inflater, container, false)
ViewCompat.setOnApplyWindowInsetsListener(binding.toolbar) { view, windowInsets ->
val actionBarHeight = TypedValue.complexToDimensionPixelSize(
getData(requireContext(), android.R.attr.actionBarSize),
resources.displayMetrics
)
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
val params = view.layoutParams
params.height = actionBarHeight + insets.top
view.layoutParams = params
view.updatePadding(top = insets.top)
windowInsets
}
filter = getFilter() filter = getFilter()
val swipeRefreshLayout: SwipeRefreshLayout val swipeRefreshLayout: SwipeRefreshLayout
val emptyRefreshLayout: SwipeRefreshLayout val emptyRefreshLayout: SwipeRefreshLayout
@ -354,21 +346,25 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
setupRefresh(swipeRefreshLayout) setupRefresh(swipeRefreshLayout)
setupRefresh(emptyRefreshLayout) setupRefresh(emptyRefreshLayout)
binding.toolbar.title = filter.title binding.toolbar.title = filter.title
binding.toolbar.setTitleTextAppearance(requireContext(), com.google.android.material.R.style.TextAppearance_Material3_HeadlineSmall)
binding.toolbar.setTitleTextColor(themeColor.primaryColor)
binding.appbarlayout.addOnOffsetChangedListener { _, verticalOffset -> binding.appbarlayout.addOnOffsetChangedListener { _, verticalOffset ->
if (verticalOffset == 0 && binding.bottomAppBar.isScrolledDown) { if (verticalOffset == 0 && binding.bottomAppBar.isScrolledDown) {
binding.bottomAppBar.performShow() binding.bottomAppBar.performShow()
} }
} }
val toolbar = run { with (binding.fab) {
themeColor.apply(binding.bottomAppBar) backgroundTintList = ColorStateList.valueOf(themeColor.primaryColor)
binding.bottomAppBar imageTintList = ColorStateList.valueOf(themeColor.colorOnPrimary)
} }
toolbar.setOnMenuItemClickListener(this) with (binding.bottomAppBar) {
toolbar.setNavigationOnClickListener { setOnMenuItemClickListener(this@TaskListFragment)
activity?.hideKeyboard() setNavigationOnClickListener {
onClickMenu() activity?.hideKeyboard()
onClickMenu()
}
setupMenu(this)
} }
setupMenu(toolbar)
binding.banner.setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) binding.banner.setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
binding.banner.setContent { binding.banner.setContent {
val context = LocalContext.current val context = LocalContext.current
@ -475,6 +471,7 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
} }
} }
} }
ViewCompat.requestApplyInsets(binding.toolbar)
return binding.root return binding.root
} }
@ -705,11 +702,17 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
private fun makeSnackbar(text: String): Snackbar? = activity?.let { private fun makeSnackbar(text: String): Snackbar? = activity?.let {
Snackbar.make(binding.taskListCoordinator, text, 4000) Snackbar.make(binding.taskListCoordinator, text, 4000)
.setAnchorView(R.id.fab) .setAnchorView(R.id.fab)
.setTextColor(it.getColor(R.color.snackbar_text_color)) .setBackgroundTint(it.getColor(R.color.dialog_background))
.setActionTextColor(it.getColor(R.color.snackbar_action_color)) .setTextColor(it.getColor(R.color.text_primary))
.apply { .setActionTextColor(themeColor.primaryColor)
view.setBackgroundColor(it.getColor(R.color.snackbar_background)) .apply {
} val offset = TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
16f,
context.resources.displayMetrics
)
view.translationY = -offset
}
} }
override fun onPause() { override fun onPause() {
@ -1123,13 +1126,5 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
private const val FRAG_TAG_DATE_TIME_PICKER = "frag_tag_date_time_picker" private const val FRAG_TAG_DATE_TIME_PICKER = "frag_tag_date_time_picker"
private const val FRAG_TAG_PRIORITY_PICKER = "frag_tag_priority_picker" private const val FRAG_TAG_PRIORITY_PICKER = "frag_tag_priority_picker"
private const val REQUEST_TAG_TASKS = 10106 private const val REQUEST_TAG_TASKS = 10106
fun newTaskListFragment(filter: Filter): TaskListFragment {
val fragment = TaskListFragment()
val bundle = Bundle()
bundle.putParcelable(EXTRA_FILTER, filter)
fragment.arguments = bundle
return fragment
}
} }
} }

@ -22,7 +22,6 @@ import org.tasks.data.entity.Task
import org.tasks.dialogs.DialogBuilder import org.tasks.dialogs.DialogBuilder
import org.tasks.extensions.Context.is24HourFormat import org.tasks.extensions.Context.is24HourFormat
import org.tasks.kmp.org.tasks.time.getTimeString import org.tasks.kmp.org.tasks.time.getTimeString
import org.tasks.themes.Theme
import org.tasks.time.DateTimeUtils2.currentTimeMillis import org.tasks.time.DateTimeUtils2.currentTimeMillis
import org.tasks.ui.TaskEditControlFragment import org.tasks.ui.TaskEditControlFragment
import javax.inject.Inject import javax.inject.Inject
@ -36,7 +35,6 @@ import javax.inject.Inject
class TimerControlSet : TaskEditControlFragment() { class TimerControlSet : TaskEditControlFragment() {
@Inject lateinit var activity: Activity @Inject lateinit var activity: Activity
@Inject lateinit var dialogBuilder: DialogBuilder @Inject lateinit var dialogBuilder: DialogBuilder
@Inject lateinit var theme: Theme
@Inject lateinit var timerPlugin: TimerPlugin @Inject lateinit var timerPlugin: TimerPlugin
private lateinit var estimated: TimeDurationControlSet private lateinit var estimated: TimeDurationControlSet
@ -81,8 +79,8 @@ class TimerControlSet : TaskEditControlFragment() {
override fun Content() { override fun Content() {
LaunchedEffect(Unit) { LaunchedEffect(Unit) {
dialogView = activity.layoutInflater.inflate(R.layout.control_set_timers_dialog, null) dialogView = activity.layoutInflater.inflate(R.layout.control_set_timers_dialog, null)
estimated = TimeDurationControlSet(activity, dialogView, R.id.estimatedDuration, theme) estimated = TimeDurationControlSet(activity, dialogView, R.id.estimatedDuration)
elapsed = TimeDurationControlSet(activity, dialogView, R.id.elapsedDuration, theme) elapsed = TimeDurationControlSet(activity, dialogView, R.id.elapsedDuration)
estimated.setTimeDuration(viewModel.estimatedSeconds.value) estimated.setTimeDuration(viewModel.estimatedSeconds.value)
elapsed.setTimeDuration(viewModel.elapsedSeconds.value) elapsed.setTimeDuration(viewModel.elapsedSeconds.value)
} }

@ -11,9 +11,13 @@ import android.view.View
import android.widget.TextView import android.widget.TextView
import com.todoroo.astrid.ui.NNumberPickerDialog.OnNNumberPickedListener import com.todoroo.astrid.ui.NNumberPickerDialog.OnNNumberPickedListener
import org.tasks.R import org.tasks.R
import org.tasks.themes.Theme
class TimeDurationControlSet(private val context: Context, view: View, timeButtonId: Int, private val theme: Theme) : OnNNumberPickedListener, View.OnClickListener { class TimeDurationControlSet(
private val context: Context,
view: View,
timeButtonId: Int,
) : OnNNumberPickedListener,
View.OnClickListener {
private val timeButton: TextView = view.findViewById(timeButtonId) private val timeButton: TextView = view.findViewById(timeButtonId)
var timeDurationInSeconds = 0 var timeDurationInSeconds = 0
private set private set
@ -64,7 +68,6 @@ class TimeDurationControlSet(private val context: Context, view: View, timeButto
if (initialValues != null) { if (initialValues != null) {
dialog!!.setInitialValues(initialValues) dialog!!.setInitialValues(initialValues)
} }
theme.applyToContext(dialog!!.context)
dialog!!.show() dialog!!.show()
} }

@ -12,14 +12,12 @@ import org.tasks.dialogs.MyTimePickerDialog
import org.tasks.dialogs.MyTimePickerDialog.Companion.newTimePicker import org.tasks.dialogs.MyTimePickerDialog.Companion.newTimePicker
import org.tasks.dialogs.MyTimePickerDialog.Companion.timeInputMode import org.tasks.dialogs.MyTimePickerDialog.Companion.timeInputMode
import org.tasks.preferences.Preferences import org.tasks.preferences.Preferences
import org.tasks.themes.ThemeAccent
import org.tasks.time.DateTime import org.tasks.time.DateTime
import org.tasks.time.DateTimeUtils2.currentTimeMillis import org.tasks.time.DateTimeUtils2.currentTimeMillis
import javax.inject.Inject import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class DateAndTimePickerActivity : AppCompatActivity() { class DateAndTimePickerActivity : AppCompatActivity() {
@Inject lateinit var themeAccent: ThemeAccent
@Inject lateinit var preferences: Preferences @Inject lateinit var preferences: Preferences
private var initial: DateTime? = null private var initial: DateTime? = null
@ -33,7 +31,6 @@ class DateAndTimePickerActivity : AppCompatActivity() {
?.getLong(EXTRA_DATE_SELECTED) ?.getLong(EXTRA_DATE_SELECTED)
?.takeIf { it > 0 } ?.takeIf { it > 0 }
?.let { DateTime(it, DateTime.UTC) } ?.let { DateTime(it, DateTime.UTC) }
themeAccent.applyStyle(theme)
if (dateSelected != null) { if (dateSelected != null) {
showTimePicker() showTimePicker()
} else { } else {

@ -26,8 +26,6 @@ class PurchaseActivity : AppCompatActivity(), OnPurchasesUpdated {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
theme.applyToContext(this)
setContent { setContent {
TasksTheme(theme = theme.themeBase.index) { TasksTheme(theme = theme.themeBase.index) {
BackHandler { BackHandler {

@ -35,7 +35,6 @@ import org.tasks.data.entity.CaldavAccount.Companion.SERVER_TASKS
import org.tasks.data.entity.CaldavCalendar import org.tasks.data.entity.CaldavCalendar
import org.tasks.data.entity.CaldavCalendar.Companion.ACCESS_OWNER import org.tasks.data.entity.CaldavCalendar.Companion.ACCESS_OWNER
import org.tasks.themes.TasksTheme import org.tasks.themes.TasksTheme
import org.tasks.themes.ThemeAccent
import org.tasks.themes.colorOn import org.tasks.themes.colorOn
import javax.inject.Inject import javax.inject.Inject
@ -43,7 +42,6 @@ import javax.inject.Inject
class CaldavCalendarSettingsActivity : BaseCaldavCalendarSettingsActivity() { class CaldavCalendarSettingsActivity : BaseCaldavCalendarSettingsActivity() {
@Inject lateinit var principalDao: PrincipalDao @Inject lateinit var principalDao: PrincipalDao
@Inject lateinit var accent: ThemeAccent
private val viewModel: CaldavCalendarViewModel by viewModels() private val viewModel: CaldavCalendarViewModel by viewModels()
@ -81,16 +79,15 @@ class CaldavCalendarSettingsActivity : BaseCaldavCalendarSettingsActivity() {
openDialog.value = false openDialog.value = false
} }
} }
val accentColor = Color(accent.accentColor)
FloatingActionButton( FloatingActionButton(
onClick = { openDialog.value = true }, onClick = { openDialog.value = true },
modifier = Modifier.padding(Constants.KEYLINE_FIRST), modifier = Modifier.padding(Constants.KEYLINE_FIRST),
containerColor = accentColor containerColor = MaterialTheme.colorScheme.primary,
contentColor = MaterialTheme.colorScheme.onPrimary,
) { ) {
Icon( Icon(
imageVector = Icons.Outlined.PersonAdd, imageVector = Icons.Outlined.PersonAdd,
contentDescription = null, contentDescription = null,
tint = colorOn(accentColor),
) )
} }
} }

@ -37,7 +37,7 @@ fun TaskEditRow(
enabled = onClick != null, enabled = onClick != null,
onClick = { onClick?.invoke() } onClick = { onClick?.invoke() }
) )
.background(MaterialTheme.colorScheme.surface), .background(MaterialTheme.colorScheme.background),
) { ) {
icon() icon()
content() content()

@ -46,7 +46,7 @@ fun DueDateRow(
} else { } else {
newDateTime(dueDate).endOfDay().isBeforeNow newDateTime(dueDate).endOfDay().isBeforeNow
}, },
onClick = onClick, onClick = { onClick() },
) )
} }

@ -6,10 +6,11 @@ import androidx.activity.compose.BackHandler
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.verticalScroll
@ -22,8 +23,10 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold import androidx.compose.material3.Scaffold
import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.rememberCoroutineScope
@ -116,6 +119,9 @@ fun TaskEditScreen(
Scaffold( Scaffold(
topBar = { topBar = {
TopAppBar( TopAppBar(
colors = TopAppBarDefaults.topAppBarColors().copy(
containerColor = MaterialTheme.colorScheme.background,
),
navigationIcon = { navigationIcon = {
if (viewState.isReadOnly) { if (viewState.isReadOnly) {
IconButton(onClick = { onBackPressed() }) { IconButton(onClick = { onBackPressed() }) {
@ -162,11 +168,10 @@ fun TaskEditScreen(
AndroidFragment<CommentBarFragment>( AndroidFragment<CommentBarFragment>(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.navigationBarsPadding() .padding(WindowInsets.navigationBars.asPaddingValues())
) )
} }
}, },
modifier = Modifier.imePadding(),
) { paddingValues -> ) { paddingValues ->
Column( Column(
modifier = Modifier modifier = Modifier

@ -10,10 +10,15 @@ import android.view.ViewGroup
import android.widget.CalendarView import android.widget.CalendarView
import android.widget.FrameLayout import android.widget.FrameLayout
import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.lifecycle.lifecycleScope
import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.google.android.material.button.MaterialButton import com.google.android.material.button.MaterialButton
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.tasks.R import org.tasks.R
import org.tasks.extensions.Context.is24HourFormat import org.tasks.extensions.Context.is24HourFormat
import org.tasks.kmp.org.tasks.time.getTimeString import org.tasks.kmp.org.tasks.time.getTimeString
@ -66,9 +71,17 @@ abstract class BaseDateTimePicker : BottomSheetDialogFragment() {
dialog dialog
.findViewById<FrameLayout>(com.google.android.material.R.id.design_bottom_sheet) .findViewById<FrameLayout>(com.google.android.material.R.id.design_bottom_sheet)
?.let { bottomSheet -> ?.let { bottomSheet ->
with (BottomSheetBehavior.from(bottomSheet)) { val behavior = BottomSheetBehavior.from(bottomSheet)
state = BottomSheetBehavior.STATE_EXPANDED behavior.skipCollapsed = true
skipCollapsed = true
val insets = ViewCompat.getRootWindowInsets(requireActivity().window.decorView)
if (insets?.isVisible(WindowInsetsCompat.Type.ime()) == true) {
lifecycleScope.launch {
delay(100)
behavior.state = BottomSheetBehavior.STATE_EXPANDED
}
} else {
behavior.state = BottomSheetBehavior.STATE_EXPANDED
} }
} }

@ -75,7 +75,6 @@ class ColorPalettePicker : DialogFragment() {
palette = requireArguments().getSerializable(EXTRA_PALETTE) as Palette palette = requireArguments().getSerializable(EXTRA_PALETTE) as Palette
colors = when (palette) { colors = when (palette) {
Palette.COLORS -> colorProvider.getThemeColors() Palette.COLORS -> colorProvider.getThemeColors()
Palette.ACCENTS -> colorProvider.getAccentColors()
Palette.LAUNCHERS -> ThemeColor.LAUNCHER_COLORS.map { color -> Palette.LAUNCHERS -> ThemeColor.LAUNCHER_COLORS.map { color ->
ThemeColor(context, requireContext().getColor(color)) ThemeColor(context, requireContext().getColor(color))
} }

@ -17,7 +17,6 @@ class ColorPickerAdapter(
enum class Palette { enum class Palette {
COLORS, COLORS,
ACCENTS,
LAUNCHERS, LAUNCHERS,
WIDGET WIDGET
} }

@ -18,7 +18,6 @@ import com.todoroo.andlib.utility.AndroidUtilities.preS
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import org.tasks.R import org.tasks.R
import org.tasks.billing.Inventory import org.tasks.billing.Inventory
import org.tasks.themes.ThemeAccent
import org.tasks.themes.ThemeBase import org.tasks.themes.ThemeBase
import org.tasks.themes.ThemeBase.EXTRA_THEME_OVERRIDE import org.tasks.themes.ThemeBase.EXTRA_THEME_OVERRIDE
import javax.inject.Inject import javax.inject.Inject
@ -48,7 +47,6 @@ class ThemePickerDialog : DialogFragment() {
@Inject lateinit var inventory: Inventory @Inject lateinit var inventory: Inventory
@Inject lateinit var dialogBuilder: DialogBuilder @Inject lateinit var dialogBuilder: DialogBuilder
@Inject lateinit var accent: ThemeAccent
@Inject lateinit var themeBase: ThemeBase @Inject lateinit var themeBase: ThemeBase
var adapter: ArrayAdapter<String>? = null var adapter: ArrayAdapter<String>? = null

@ -6,11 +6,9 @@ import dagger.Provides
import dagger.hilt.InstallIn import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.android.scopes.ActivityScoped import dagger.hilt.android.scopes.ActivityScoped
import org.tasks.R
import org.tasks.billing.Inventory import org.tasks.billing.Inventory
import org.tasks.preferences.Preferences import org.tasks.preferences.Preferences
import org.tasks.themes.ColorProvider import org.tasks.themes.ColorProvider
import org.tasks.themes.ThemeAccent
import org.tasks.themes.ThemeBase import org.tasks.themes.ThemeBase
import org.tasks.themes.ThemeColor import org.tasks.themes.ThemeColor
@ -27,9 +25,4 @@ class ActivityModule {
@ActivityScoped @ActivityScoped
fun getThemeColor(colorProvider: ColorProvider, preferences: Preferences): ThemeColor fun getThemeColor(colorProvider: ColorProvider, preferences: Preferences): ThemeColor
= colorProvider.getThemeColor(preferences.defaultThemeColor, true) = colorProvider.getThemeColor(preferences.defaultThemeColor, true)
@Provides
@ActivityScoped
fun getThemeAccent(colorProvider: ColorProvider, preferences: Preferences): ThemeAccent
= colorProvider.getThemeAccent(preferences.getInt(R.string.p_theme_accent, 1))
} }

@ -2,11 +2,13 @@ package org.tasks.location
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList
import android.content.res.Configuration import android.content.res.Configuration
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.SearchView
@ -89,7 +91,7 @@ class LocationPickerActivity : AppCompatActivity(), Toolbar.OnMenuItemClickListe
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
theme.applyTheme(this) enableEdgeToEdge()
window.statusBarColor = ContextCompat.getColor(this, android.R.color.transparent) window.statusBarColor = ContextCompat.getColor(this, android.R.color.transparent)
val binding = ActivityLocationPickerBinding.inflate(layoutInflater) val binding = ActivityLocationPickerBinding.inflate(layoutInflater)
setContentView(binding.root) setContentView(binding.root)
@ -123,8 +125,6 @@ class LocationPickerActivity : AppCompatActivity(), Toolbar.OnMenuItemClickListe
search = menu.findItem(R.id.menu_search) search = menu.findItem(R.id.menu_search)
search.setOnActionExpandListener(this) search.setOnActionExpandListener(this)
toolbar.setOnMenuItemClickListener(this) toolbar.setOnMenuItemClickListener(this)
val themeColor = theme.themeColor
themeColor.applyToNavigationBar(this)
val dark = theme.themeBase.isDarkTheme(this) val dark = theme.themeBase.isDarkTheme(this)
map.init(this, this, dark) map.init(this, this, dark)
val params = appBarLayout.layoutParams as CoordinatorLayout.LayoutParams val params = appBarLayout.layoutParams as CoordinatorLayout.LayoutParams
@ -164,7 +164,11 @@ class LocationPickerActivity : AppCompatActivity(), Toolbar.OnMenuItemClickListe
recyclerView.layoutManager = LinearLayoutManager(this) recyclerView.layoutManager = LinearLayoutManager(this)
recyclerView.adapter = if (search.isActionViewExpanded) searchAdapter else recentsAdapter recyclerView.adapter = if (search.isActionViewExpanded) searchAdapter else recentsAdapter
binding.currentLocation.setOnClickListener { currentLocation() } with (binding.currentLocation) {
setOnClickListener { currentLocation() }
backgroundTintList = ColorStateList.valueOf(theme.themeColor.primaryColor)
imageTintList = ColorStateList.valueOf(theme.themeColor.colorOnPrimary)
}
binding.selectThisLocation.setOnClickListener { selectLocation() } binding.selectThisLocation.setOnClickListener { selectLocation() }
} }

@ -29,7 +29,6 @@ import org.tasks.injection.InjectingPreferenceFragment
import org.tasks.locale.LocalePickerDialog import org.tasks.locale.LocalePickerDialog
import org.tasks.preferences.DefaultFilterProvider import org.tasks.preferences.DefaultFilterProvider
import org.tasks.preferences.Preferences import org.tasks.preferences.Preferences
import org.tasks.themes.ThemeAccent
import org.tasks.themes.ThemeBase import org.tasks.themes.ThemeBase
import org.tasks.themes.ThemeBase.DEFAULT_BASE_THEME import org.tasks.themes.ThemeBase.DEFAULT_BASE_THEME
import org.tasks.themes.ThemeBase.EXTRA_THEME_OVERRIDE import org.tasks.themes.ThemeBase.EXTRA_THEME_OVERRIDE
@ -43,7 +42,6 @@ class LookAndFeel : InjectingPreferenceFragment() {
@Inject lateinit var themeBase: ThemeBase @Inject lateinit var themeBase: ThemeBase
@Inject lateinit var themeColor: ThemeColor @Inject lateinit var themeColor: ThemeColor
@Inject lateinit var themeAccent: ThemeAccent
@Inject lateinit var preferences: Preferences @Inject lateinit var preferences: Preferences
@Inject lateinit var localBroadcastManager: LocalBroadcastManager @Inject lateinit var localBroadcastManager: LocalBroadcastManager
@Inject lateinit var defaultFilterProvider: DefaultFilterProvider @Inject lateinit var defaultFilterProvider: DefaultFilterProvider
@ -102,12 +100,6 @@ class LookAndFeel : InjectingPreferenceFragment() {
ColorPickerAdapter.Palette.COLORS, ColorPickerAdapter.Palette.COLORS,
REQUEST_COLOR_PICKER REQUEST_COLOR_PICKER
) )
setupColorPreference(
R.string.p_theme_accent,
themeAccent.pickerColor,
ColorPickerAdapter.Palette.ACCENTS,
REQUEST_ACCENT_PICKER
)
updateLauncherPreference() updateLauncherPreference()
} }
@ -170,15 +162,6 @@ class LookAndFeel : InjectingPreferenceFragment() {
} }
} }
} }
REQUEST_ACCENT_PICKER -> {
if (resultCode == RESULT_OK) {
val index = data!!.getIntExtra(ColorPalettePicker.EXTRA_SELECTED, 0)
if (preferences.getInt(R.string.p_theme_accent, -1) != index) {
preferences.setInt(R.string.p_theme_accent, index)
recreate()
}
}
}
REQUEST_LAUNCHER_PICKER -> { REQUEST_LAUNCHER_PICKER -> {
if (resultCode == RESULT_OK) { if (resultCode == RESULT_OK) {
val index = data!!.getIntExtra(ColorPalettePicker.EXTRA_SELECTED, 0) val index = data!!.getIntExtra(ColorPalettePicker.EXTRA_SELECTED, 0)
@ -233,7 +216,6 @@ class LookAndFeel : InjectingPreferenceFragment() {
companion object { companion object {
private const val REQUEST_THEME_PICKER = 10001 private const val REQUEST_THEME_PICKER = 10001
private const val REQUEST_COLOR_PICKER = 10002 private const val REQUEST_COLOR_PICKER = 10002
private const val REQUEST_ACCENT_PICKER = 10003
private const val REQUEST_LAUNCHER_PICKER = 10004 private const val REQUEST_LAUNCHER_PICKER = 10004
private const val REQUEST_LOCALE = 10006 private const val REQUEST_LOCALE = 10006
private const val REQUEST_PURCHASE = 10007 private const val REQUEST_PURCHASE = 10007

@ -11,7 +11,6 @@ import org.tasks.data.dao.TaskDao
import org.tasks.intents.TaskIntents import org.tasks.intents.TaskIntents
import org.tasks.notifications.NotificationManager import org.tasks.notifications.NotificationManager
import org.tasks.receivers.CompleteTaskReceiver import org.tasks.receivers.CompleteTaskReceiver
import org.tasks.themes.ThemeAccent
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
@ -19,13 +18,11 @@ import javax.inject.Inject
class NotificationActivity : AppCompatActivity(), NotificationDialog.NotificationHandler { class NotificationActivity : AppCompatActivity(), NotificationDialog.NotificationHandler {
@Inject lateinit var notificationManager: NotificationManager @Inject lateinit var notificationManager: NotificationManager
@Inject lateinit var taskDao: TaskDao @Inject lateinit var taskDao: TaskDao
@Inject lateinit var themeAccent: ThemeAccent
private var taskId: Long = 0 private var taskId: Long = 0
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
themeAccent.applyStyle(theme)
val intent = intent val intent = intent
taskId = intent.getLongExtra(EXTRA_TASK_ID, 0L) taskId = intent.getLongExtra(EXTRA_TASK_ID, 0L)
val fragmentManager = supportFragmentManager val fragmentManager = supportFragmentManager

@ -14,7 +14,6 @@ import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.tasks.activities.DateAndTimePickerActivity import org.tasks.activities.DateAndTimePickerActivity
import org.tasks.dialogs.MyTimePickerDialog import org.tasks.dialogs.MyTimePickerDialog
import org.tasks.themes.ThemeAccent
import org.tasks.time.DateTime import org.tasks.time.DateTime
import javax.inject.Inject import javax.inject.Inject
@ -22,14 +21,12 @@ import javax.inject.Inject
class SnoozeActivity : AppCompatActivity(), SnoozeCallback, DialogInterface.OnCancelListener { class SnoozeActivity : AppCompatActivity(), SnoozeCallback, DialogInterface.OnCancelListener {
@Inject lateinit var taskDao: TaskDao @Inject lateinit var taskDao: TaskDao
@Inject lateinit var alarmService: AlarmService @Inject lateinit var alarmService: AlarmService
@Inject lateinit var themeAccent: ThemeAccent
private val taskIds: MutableList<Long> = ArrayList() private val taskIds: MutableList<Long> = ArrayList()
private var pickingDateTime = false private var pickingDateTime = false
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
themeAccent.applyStyle(theme)
val intent = intent val intent = intent
if (intent.hasExtra(EXTRA_TASK_ID)) { if (intent.hasExtra(EXTRA_TASK_ID)) {
taskIds.add(intent.getLongExtra(EXTRA_TASK_ID, -1L)) taskIds.add(intent.getLongExtra(EXTRA_TASK_ID, -1L))

@ -6,7 +6,6 @@ import dagger.hilt.android.qualifiers.ApplicationContext
import org.tasks.R import org.tasks.R
import org.tasks.kmp.org.tasks.themes.ColorProvider.priorityColor import org.tasks.kmp.org.tasks.themes.ColorProvider.priorityColor
import org.tasks.kmp.org.tasks.themes.ColorProvider.saturated import org.tasks.kmp.org.tasks.themes.ColorProvider.saturated
import org.tasks.preferences.Preferences
import javax.inject.Inject import javax.inject.Inject
class ColorProvider @Inject constructor( class ColorProvider @Inject constructor(
@ -30,17 +29,9 @@ class ColorProvider @Inject constructor(
isDarkMode = isDark, isDarkMode = isDark,
) )
fun getThemeAccent(index: Int) = ThemeAccent(context, if (isDark) {
ThemeAccent.ACCENTS_DESATURATED[index]
} else {
ThemeAccent.ACCENTS[index]
})
fun getThemeColors(adjust: Boolean = true) = ThemeColor.COLORS.map { c -> fun getThemeColors(adjust: Boolean = true) = ThemeColor.COLORS.map { c ->
getThemeColor(context.getColor(c), adjust) getThemeColor(context.getColor(c), adjust)
} }
fun getWidgetColors() = getThemeColors(false) fun getWidgetColors() = getThemeColors(false)
fun getAccentColors() = ThemeAccent.ACCENTS.indices.map(this@ColorProvider::getThemeAccent)
} }

@ -2,17 +2,15 @@ package org.tasks.themes
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import android.graphics.PixelFormat
import android.view.LayoutInflater import android.view.LayoutInflater
import javax.inject.Inject import javax.inject.Inject
class Theme @Inject constructor( class Theme @Inject constructor(
val themeBase: ThemeBase, val themeBase: ThemeBase,
val themeColor: ThemeColor, val themeColor: ThemeColor,
private val themeAccent: ThemeAccent
) { ) {
fun getLayoutInflater(context: Context) = fun getLayoutInflater(context: Context) =
wrap(context).getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
fun applyThemeAndStatusBarColor(activity: Activity) { fun applyThemeAndStatusBarColor(activity: Activity) {
applyTheme(activity) applyTheme(activity)
@ -21,19 +19,5 @@ class Theme @Inject constructor(
fun applyTheme(activity: Activity) { fun applyTheme(activity: Activity) {
themeBase.set(activity) themeBase.set(activity)
applyToContext(activity)
activity.window.setFormat(PixelFormat.RGBA_8888)
}
fun applyToContext(context: Context) {
val theme = context.theme
themeColor.applyStyle(theme)
themeAccent.applyStyle(theme)
}
private fun wrap(context: Context): Context {
val wrapper = themeBase.wrap(context)
applyToContext(wrapper)
return wrapper
} }
} }

@ -1,119 +0,0 @@
package org.tasks.themes;
import android.content.Context;
import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import org.tasks.R;
import org.tasks.dialogs.ColorPalettePicker.Pickable;
public class ThemeAccent implements Pickable {
public static final int[] ACCENTS =
new int[] {
R.style.BlueGreyAccent,
R.style.RedAccent,
R.style.PinkAccent,
R.style.PurpleAccent,
R.style.DeepPurpleAccent,
R.style.IndigoAccent,
R.style.BlueAccent,
R.style.LightBlueAccent,
R.style.CyanAccent,
R.style.TealAccent,
R.style.GreenAccent,
R.style.LightGreenAccent,
R.style.LimeAccent,
R.style.YellowAccent,
R.style.AmberAccent,
R.style.OrangeAccent,
R.style.DeepOrangeAccent
};
public static final int[] ACCENTS_DESATURATED =
new int[] {
R.style.BlueGreyAccentDesaturated,
R.style.RedAccentDesaturated,
R.style.PinkAccentDesaturated,
R.style.PurpleAccentDesaturated,
R.style.DeepPurpleAccentDesaturated,
R.style.IndigoAccentDesaturated,
R.style.BlueAccentDesaturated,
R.style.LightBlueAccentDesaturated,
R.style.CyanAccentDesaturated,
R.style.TealAccentDesaturated,
R.style.GreenAccentDesaturated,
R.style.LightGreenAccentDesaturated,
R.style.LimeAccentDesaturated,
R.style.YellowAccentDesaturated,
R.style.AmberAccentDesaturated,
R.style.OrangeAccentDesaturated,
R.style.DeepOrangeAccentDesaturated
};
public static final Parcelable.Creator<ThemeAccent> CREATOR =
new Parcelable.Creator<>() {
@Override
public ThemeAccent createFromParcel(Parcel source) {
return new ThemeAccent(source);
}
@Override
public ThemeAccent[] newArray(int size) {
return new ThemeAccent[size];
}
};
private final int style;
@Deprecated private final int accentColor;
public ThemeAccent(Context context, int style) {
this.style = style;
Resources.Theme theme = new ContextThemeWrapper(context, style).getTheme();
this.accentColor = resolveAttribute(theme, com.google.android.material.R.attr.colorSecondary);
}
private ThemeAccent(Parcel source) {
style = source.readInt();
accentColor = source.readInt();
}
private static int resolveAttribute(Resources.Theme theme, int attribute) {
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(attribute, typedValue, true);
return typedValue.data;
}
public void applyStyle(Resources.Theme theme) {
theme.applyStyle(style, true);
}
@Override
public int getPickerColor() {
return accentColor;
}
@Override
public boolean isFree() {
return style == R.style.BlueGreyAccent ||
style == R.style.RedAccent ||
style == R.style.BlueGreyAccentDesaturated ||
style == R.style.RedAccentDesaturated;
}
@Deprecated
public int getAccentColor() {
return accentColor;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(style);
dest.writeInt(accentColor);
}
}

@ -5,8 +5,6 @@ import static org.tasks.themes.ColorUtilsKt.calculateContrast;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.os.Build.VERSION_CODES; import android.os.Build.VERSION_CODES;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
@ -16,8 +14,6 @@ import androidx.annotation.ColorInt;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.core.os.ParcelCompat; import androidx.core.os.ParcelCompat;
import com.google.android.material.bottomappbar.BottomAppBar;
import org.tasks.R; import org.tasks.R;
import org.tasks.dialogs.ColorPalettePicker.Pickable; import org.tasks.dialogs.ColorPalettePicker.Pickable;
@ -209,10 +205,6 @@ public class ThemeColor implements Pickable {
: flag & ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR; : flag & ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
} }
void applyStyle(Resources.Theme theme) {
theme.applyStyle(isDark ? R.style.BlackToolbarTheme : R.style.WhiteToolbarTheme, true);
}
@Override @Override
public int getPickerColor() { public int getPickerColor() {
return colorPrimary; return colorPrimary;
@ -248,10 +240,6 @@ public class ThemeColor implements Pickable {
return isDark; return isDark;
} }
public void apply(BottomAppBar bottomAppBar) {
bottomAppBar.setBackgroundTint(ColorStateList.valueOf(getPrimaryColor()));
}
@Override @Override
public int describeContents() { public int describeContents() {
return 0; return 0;

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 24% opacity -->
<item android:alpha="0.24" android:color="?attr/colorSecondary" android:state_enabled="true" android:state_selected="true"/>
<item android:alpha="0.24" android:color="?attr/colorSecondary" android:state_enabled="true" android:state_checked="true"/>
<!-- 12% of 87% opacity -->
<item android:alpha="0.10" android:color="?attr/colorOnSurface" android:state_enabled="true"/>
<item android:alpha="0.12" android:color="?attr/colorOnSurface"/>
</selector>

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorSecondary" android:state_enabled="true" android:state_selected="true"/>
<item android:color="?attr/colorSecondary" android:state_enabled="true" android:state_checked="true"/>
<!-- 87% opacity. -->
<item android:alpha="0.87" android:color="?attr/colorOnSurface" android:state_enabled="true"/>
<!-- 38% of 87% opacity. -->
<item android:alpha="0.33" android:color="?attr/colorOnSurface"/>
</selector>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2018 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorSecondary" android:state_focused="true"/>
<!-- 4% overlay over 42% colorOnSurface -->
<item android:alpha="0.46" android:color="?attr/colorOnSurface" android:state_hovered="true"/>
<item android:alpha="0.38" android:color="?attr/colorOnSurface" android:state_enabled="false"/>
<item android:alpha="0.42" android:color="?attr/colorOnSurface"/>
</selector>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="1.00" android:color="?attr/colorSecondary" android:state_checkable="true" android:state_checked="true" android:state_enabled="true"/>
<item android:alpha="0.60" android:color="?attr/colorOnSurface" android:state_checkable="true" android:state_checked="false" android:state_enabled="true"/>
<item android:alpha="1.00" android:color="?attr/colorSecondary" android:state_enabled="true"/>
<item android:alpha="0.38" android:color="?attr/colorOnSurface"/>
</selector>

@ -19,7 +19,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:theme="@style/ToolbarTheme" android:theme="@style/LegacyToolbarTheme"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:contentScrim="@color/content_background" app:contentScrim="@color/content_background"
app:statusBarScrim="@color/content_background" app:statusBarScrim="@color/content_background"
@ -62,7 +62,6 @@
android:layout_gravity="end|bottom" android:layout_gravity="end|bottom"
android:padding="0dp" android:padding="0dp"
android:src="@drawable/ic_outline_gps_fixed_24px" android:src="@drawable/ic_outline_gps_fixed_24px"
app:backgroundTint="?attr/colorAccent"
app:borderWidth="0dp" app:borderWidth="0dp"
app:layout_constraintBottom_toBottomOf="@id/map" app:layout_constraintBottom_toBottomOf="@id/map"
app:layout_constraintEnd_toEndOf="@id/map"/> app:layout_constraintEnd_toEndOf="@id/map"/>
@ -114,7 +113,7 @@
android:gravity="start|center_vertical" android:gravity="start|center_vertical"
android:text="@string/pick_this_location" android:text="@string/pick_this_location"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
android:textColor="@color/text_primary"/> android:textColor="@color/text_primary"/>
<TextView <TextView
@ -128,7 +127,7 @@
android:gravity="start" android:gravity="start"
android:text="@string/or_choose_a_location" android:text="@string/or_choose_a_location"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
android:textColor="@color/text_primary"/> android:textColor="@color/text_primary"/>
</RelativeLayout> </RelativeLayout>
@ -139,7 +138,7 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:theme="@style/ToolbarTheme" android:theme="@style/LegacyToolbarTheme"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:popupTheme="@style/popup_overlay" app:popupTheme="@style/popup_overlay"
app:title="@string/choose_a_location"/> app:title="@string/choose_a_location"/>
@ -174,7 +173,7 @@
android:gravity="start" android:gravity="start"
android:text="@string/TLA_menu_search" android:text="@string/TLA_menu_search"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
android:textColor="@color/text_primary"/> android:textColor="@color/text_primary"/>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
@ -188,7 +187,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/window_background" android:background="@color/window_background"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:listitem="@layout/row_place"/> tools:listitem="@layout/row_place"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/date_group" android:id="@+id/date_group"
android:layout_width="0dp" android:layout_width="0dp"

@ -20,7 +20,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/url_layout" android:id="@+id/url_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingBottom="@dimen/keyline_first" android:paddingBottom="@dimen/keyline_first"
@ -37,7 +37,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/user_layout" android:id="@+id/user_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingBottom="@dimen/keyline_first" android:paddingBottom="@dimen/keyline_first"
@ -54,7 +54,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_layout" android:id="@+id/password_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:endIconMode="custom" app:endIconMode="custom"

@ -16,7 +16,7 @@
android:layout_alignParentTop="true" /> android:layout_alignParentTop="true" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.Material3.Button.TextButton"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:id="@+id/ok_button" android:id="@+id/ok_button"
android:text="@string/ok" android:text="@string/ok"
@ -26,7 +26,7 @@
android:layout_alignParentEnd="true" /> android:layout_alignParentEnd="true" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.Material3.Button.TextButton"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:layout_below="@id/divider" android:layout_below="@id/divider"
android:id="@+id/cancel_button" android:id="@+id/cancel_button"

@ -30,7 +30,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/dismiss_button" android:id="@+id/dismiss_button"
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/keyline_first" android:layout_marginStart="@dimen/keyline_first"

@ -24,7 +24,7 @@
android:layout_gravity="top" android:layout_gravity="top"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/content_background" android:background="?attr/background"
android:theme="@style/ToolbarTheme" android:theme="@style/ToolbarTheme"
app:hideOnScroll="true" app:hideOnScroll="true"
app:layout_scrollFlags="scroll|enterAlways" app:layout_scrollFlags="scroll|enterAlways"
@ -36,7 +36,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.compose.ui.platform.ComposeView <androidx.compose.ui.platform.ComposeView
android:id="@+id/banner" android:id="@+id/banner"
@ -71,22 +71,21 @@
<com.google.android.material.bottomappbar.BottomAppBar <com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar" android:id="@+id/bottomAppBar"
style="@style/Widget.MaterialComponents.BottomAppBar" style="@style/Widget.Material3.BottomAppBar"
android:theme="@style/ToolbarTheme"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:theme="?attr/overlay_theme"
app:popupTheme="@style/popup_overlay"
app:hideOnScroll="true" app:hideOnScroll="true"
app:navigationIcon="@drawable/ic_outline_menu_24px" /> app:navigationIcon="@drawable/ic_outline_menu_24px"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/action_create_new_task" android:contentDescription="@string/action_create_new_task"
app:backgroundTint="?attr/colorAccent"
app:layout_anchor="@id/bottomAppBar" app:layout_anchor="@id/bottomAppBar"
app:srcCompat="@drawable/ic_outline_add_24px" /> app:layout_anchorGravity="top|end"
app:srcCompat="@drawable/ic_outline_add_24px"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -42,7 +42,7 @@
android:gravity="start|top" android:gravity="start|top"
android:maxLines="2" android:maxLines="2"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"/> android:textAppearance="@style/TextAppearance.Material3.BodyMedium"/>
<TextView <TextView
android:id="@+id/address" android:id="@+id/address"
@ -56,7 +56,7 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:visibility="gone" android:visibility="gone"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"/> android:textAppearance="@style/TextAppearance.Material3.BodyMedium"/>
</RelativeLayout> </RelativeLayout>

@ -26,4 +26,4 @@
android:drawablePadding="@dimen/keyline_second" android:drawablePadding="@dimen/keyline_second"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textSize="18sp" android:textSize="18sp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"/> android:textAppearance="@style/TextAppearance.Material3.BodyMedium"/>

@ -4,7 +4,7 @@
android:id="@+id/header_row" android:id="@+id/header_row"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"> android:foreground="?attr/selectableItemBackground">
<TextView <TextView
android:id="@+id/header" android:id="@+id/header"

@ -116,7 +116,6 @@
<string name="opacity">التعتيم</string> <string name="opacity">التعتيم</string>
<string name="settings_localization">تخصيص اللغة و الجهة</string> <string name="settings_localization">تخصيص اللغة و الجهة</string>
<string name="backup_BAc_export">نسخ احتياطي الآن</string> <string name="backup_BAc_export">نسخ احتياطي الآن</string>
<string name="accent">اللون الثانوي</string>
<string name="theme_system_default">افتراضيات النظام</string> <string name="theme_system_default">افتراضيات النظام</string>
<string name="theme_day_night">صباحي/مسائي</string> <string name="theme_day_night">صباحي/مسائي</string>
<string name="theme_wallpaper">خلفية</string> <string name="theme_wallpaper">خلفية</string>

@ -287,7 +287,6 @@
<string name="opacity">Непрозрачност</string> <string name="opacity">Непрозрачност</string>
<string name="theme">Тема</string> <string name="theme">Тема</string>
<string name="color">Цвят</string> <string name="color">Цвят</string>
<string name="accent">Акцент</string>
<string name="launcher_icon">Икона за стартиране</string> <string name="launcher_icon">Икона за стартиране</string>
<string name="theme_black">Черна</string> <string name="theme_black">Черна</string>
<string name="theme_light">Светла</string> <string name="theme_light">Светла</string>

@ -502,5 +502,4 @@
<string name="restart_later">Després</string> <string name="restart_later">Després</string>
<string name="quiet_hours_in_effect">Les hores tranquil·les són efectives</string> <string name="quiet_hours_in_effect">Les hores tranquil·les són efectives</string>
<string name="opacity_footer">Opacitat del peu</string> <string name="opacity_footer">Opacitat del peu</string>
<string name="accent">Accent</string>
</resources> </resources>

@ -313,7 +313,6 @@
<string name="url_required">Zadejte URL</string> <string name="url_required">Zadejte URL</string>
<string name="url_host_name_required">Zadejte adresu serveru</string> <string name="url_host_name_required">Zadejte adresu serveru</string>
<string name="url_invalid_scheme">Musí začínat na http(s)://</string> <string name="url_invalid_scheme">Musí začínat na http(s)://</string>
<string name="accent">Doplňková barva</string>
<string name="launcher_icon">Ikona na domovské obrazovce</string> <string name="launcher_icon">Ikona na domovské obrazovce</string>
<string name="led_notification">LED upozornění</string> <string name="led_notification">LED upozornění</string>
<string name="hardware_support_required">Je vyžadována hardwarová podpora</string> <string name="hardware_support_required">Je vyžadována hardwarová podpora</string>

@ -259,7 +259,6 @@
<string name="theme_light">Lys</string> <string name="theme_light">Lys</string>
<string name="launcher_icon">App-ikon</string> <string name="launcher_icon">App-ikon</string>
<string name="theme_black">Sort</string> <string name="theme_black">Sort</string>
<string name="accent">Fremhævelse</string>
<string name="icon">Ikon</string> <string name="icon">Ikon</string>
<string name="color">Farve</string> <string name="color">Farve</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>

@ -277,7 +277,6 @@
<string name="default_list">Standardliste</string> <string name="default_list">Standardliste</string>
<string name="opacity">Deckkraft</string> <string name="opacity">Deckkraft</string>
<string name="color">Farbe</string> <string name="color">Farbe</string>
<string name="accent">Akzent</string>
<string name="launcher_icon">Launcher-Symbol</string> <string name="launcher_icon">Launcher-Symbol</string>
<string name="theme_black">Schwarz</string> <string name="theme_black">Schwarz</string>
<string name="theme_light">Hell</string> <string name="theme_light">Hell</string>

@ -596,7 +596,6 @@
<string name="alarm_before_due">%s antaŭ limdato</string> <string name="alarm_before_due">%s antaŭ limdato</string>
<string name="no_app_found">Neniu programeto povis pritrakti ĉi tiun peton</string> <string name="no_app_found">Neniu programeto povis pritrakti ĉi tiun peton</string>
<string name="launcher_icon">Lanĉila piktogramo</string> <string name="launcher_icon">Lanĉila piktogramo</string>
<string name="accent">Akcento</string>
<string name="caldav_home_set_not_found">Ne trovis hejman aron</string> <string name="caldav_home_set_not_found">Ne trovis hejman aron</string>
<string name="refresh_purchases">Reŝargi aĉetojn</string> <string name="refresh_purchases">Reŝargi aĉetojn</string>
<string name="background_location_permission_required">Tasks kolektas lokan datumon por ebligi lok-bazitajn memorigilojn, eĉ kiam la programeto estas fermita aŭ ne uzata.</string> <string name="background_location_permission_required">Tasks kolektas lokan datumon por ebligi lok-bazitajn memorigilojn, eĉ kiam la programeto estas fermita aŭ ne uzata.</string>

@ -299,7 +299,6 @@
<string name="filter">Filtro</string> <string name="filter">Filtro</string>
<string name="opacity">Opacidad</string> <string name="opacity">Opacidad</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="accent">Acentuado</string>
<string name="launcher_icon">Icono del iniciador</string> <string name="launcher_icon">Icono del iniciador</string>
<string name="theme_black">Negro</string> <string name="theme_black">Negro</string>
<string name="theme_light">Claro</string> <string name="theme_light">Claro</string>

@ -425,7 +425,6 @@
<string name="next_sunday">Järgmine P</string> <string name="next_sunday">Järgmine P</string>
<string name="next_saturday">Järgmine L</string> <string name="next_saturday">Järgmine L</string>
<string name="settings_localization">Kohalikustamine</string> <string name="settings_localization">Kohalikustamine</string>
<string name="accent">Rõhuvärv</string>
<string name="custom_filter_has_reminder">Meeldetuletusega</string> <string name="custom_filter_has_reminder">Meeldetuletusega</string>
<string name="privacy">Privaatsus</string> <string name="privacy">Privaatsus</string>
<string name="TEA_add_subtask">Lisa alamülesanne</string> <string name="TEA_add_subtask">Lisa alamülesanne</string>

@ -288,7 +288,6 @@
<string name="opacity">Opakutasuna</string> <string name="opacity">Opakutasuna</string>
<string name="theme">Azala</string> <string name="theme">Azala</string>
<string name="color">Kolorea</string> <string name="color">Kolorea</string>
<string name="accent">Azentua</string>
<string name="launcher_icon">Abiarazlearen ikonoa</string> <string name="launcher_icon">Abiarazlearen ikonoa</string>
<string name="theme_black">Beltza</string> <string name="theme_black">Beltza</string>
<string name="theme_light">Argia</string> <string name="theme_light">Argia</string>

@ -265,7 +265,6 @@
<string name="opacity">Läpinäkyvyys</string> <string name="opacity">Läpinäkyvyys</string>
<string name="theme">Teema</string> <string name="theme">Teema</string>
<string name="color">Väri</string> <string name="color">Väri</string>
<string name="accent">Sävy</string>
<string name="theme_black">Musta</string> <string name="theme_black">Musta</string>
<string name="theme_light">Vaalea</string> <string name="theme_light">Vaalea</string>
<string name="theme_dark">Tumma</string> <string name="theme_dark">Tumma</string>

@ -401,7 +401,6 @@
<string name="vibrations">Vibrations</string> <string name="vibrations">Vibrations</string>
<string name="location_radius_meters">%s m</string> <string name="location_radius_meters">%s m</string>
<string name="tags">Étiquettes</string> <string name="tags">Étiquettes</string>
<string name="accent">Couleur d\'accentuation</string>
<string name="badges">Badges</string> <string name="badges">Badges</string>
<string name="list_separator_with_space">", "</string> <string name="list_separator_with_space">", "</string>
<string name="version_string">Version %s</string> <string name="version_string">Version %s</string>

@ -208,7 +208,6 @@
<string name="opacity">Opacidade</string> <string name="opacity">Opacidade</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Cor</string> <string name="color">Cor</string>
<string name="accent">Resaltado</string>
<string name="theme_black">Negro</string> <string name="theme_black">Negro</string>
<string name="theme_light">Claro</string> <string name="theme_light">Claro</string>
<string name="theme_dark">Escuro</string> <string name="theme_dark">Escuro</string>

@ -345,7 +345,6 @@
<string name="theme_light">Svjetla</string> <string name="theme_light">Svjetla</string>
<string name="theme_black">Crna</string> <string name="theme_black">Crna</string>
<string name="launcher_icon">Ikona pokretača</string> <string name="launcher_icon">Ikona pokretača</string>
<string name="accent">Isticanje</string>
<string name="icon">Ikona</string> <string name="icon">Ikona</string>
<string name="color">Boja</string> <string name="color">Boja</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>

@ -281,7 +281,6 @@
<string name="opacity">Átlátszóság</string> <string name="opacity">Átlátszóság</string>
<string name="theme">Téma</string> <string name="theme">Téma</string>
<string name="color">Szín</string> <string name="color">Szín</string>
<string name="accent">Kiemelés</string>
<string name="launcher_icon">Launcher ikon</string> <string name="launcher_icon">Launcher ikon</string>
<string name="theme_black">Fekete</string> <string name="theme_black">Fekete</string>
<string name="theme_light">Világos</string> <string name="theme_light">Világos</string>

@ -219,7 +219,6 @@
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Warna</string> <string name="color">Warna</string>
<string name="icon">Ikon</string> <string name="icon">Ikon</string>
<string name="accent">Aksen</string>
<string name="launcher_icon">Ikon peluncur</string> <string name="launcher_icon">Ikon peluncur</string>
<string name="theme_black">Hitam</string> <string name="theme_black">Hitam</string>
<string name="theme_light">Cerah</string> <string name="theme_light">Cerah</string>

@ -296,7 +296,6 @@
<string name="opacity">Opacità</string> <string name="opacity">Opacità</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Colore</string> <string name="color">Colore</string>
<string name="accent">Colore secondario</string>
<string name="launcher_icon">Icona del launcher</string> <string name="launcher_icon">Icona del launcher</string>
<string name="theme_black">Nero</string> <string name="theme_black">Nero</string>
<string name="theme_light">Chiaro</string> <string name="theme_light">Chiaro</string>

@ -318,7 +318,6 @@
<string name="opacity">אטימות</string> <string name="opacity">אטימות</string>
<string name="theme">ערכת נושא</string> <string name="theme">ערכת נושא</string>
<string name="color">צבע</string> <string name="color">צבע</string>
<string name="accent">צבע משני</string>
<string name="launcher_icon">צלמית משגר</string> <string name="launcher_icon">צלמית משגר</string>
<string name="theme_black">שחור</string> <string name="theme_black">שחור</string>
<string name="theme_light">בהיר</string> <string name="theme_light">בהיר</string>

@ -283,7 +283,6 @@
<string name="opacity">透明度</string> <string name="opacity">透明度</string>
<string name="theme">テーマ</string> <string name="theme">テーマ</string>
<string name="color"></string> <string name="color"></string>
<string name="accent">アクセント</string>
<string name="launcher_icon">ランチャーアイコン</string> <string name="launcher_icon">ランチャーアイコン</string>
<string name="theme_black"></string> <string name="theme_black"></string>
<string name="theme_light">ライト</string> <string name="theme_light">ライト</string>

@ -280,7 +280,6 @@
<string name="opacity">불투명도</string> <string name="opacity">불투명도</string>
<string name="theme">테마</string> <string name="theme">테마</string>
<string name="color">색상</string> <string name="color">색상</string>
<string name="accent">강조</string>
<string name="launcher_icon">런처 아이콘</string> <string name="launcher_icon">런처 아이콘</string>
<string name="theme_black">검정</string> <string name="theme_black">검정</string>
<string name="theme_light">밝게</string> <string name="theme_light">밝게</string>

@ -306,7 +306,6 @@
<string name="opacity">Permatomumas</string> <string name="opacity">Permatomumas</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Spalva</string> <string name="color">Spalva</string>
<string name="accent">Akcentas</string>
<string name="launcher_icon">Paleidimo piktograma</string> <string name="launcher_icon">Paleidimo piktograma</string>
<string name="theme_black">Juoda</string> <string name="theme_black">Juoda</string>
<string name="theme_light">Šviesi</string> <string name="theme_light">Šviesi</string>

@ -312,7 +312,6 @@
<string name="filter">Filter</string> <string name="filter">Filter</string>
<string name="theme">Drakt</string> <string name="theme">Drakt</string>
<string name="color">Farge</string> <string name="color">Farge</string>
<string name="accent">Aksentfarge</string>
<string name="launcher_icon">Oppstarterfarge</string> <string name="launcher_icon">Oppstarterfarge</string>
<string name="theme_black">Svart</string> <string name="theme_black">Svart</string>
<string name="theme_light">Lys</string> <string name="theme_light">Lys</string>

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="window_background">@color/md_background_dark</color> <color name="window_background">#FF0F1416</color>
<color name="content_background">@color/md_background_dark</color> <color name="content_background">#FF0F1416</color>
<color name="dialog_background">@color/md_background_dark</color> <color name="dialog_background">#FF1B2023</color>
<color name="widget_background_follow_system">@color/md_background_dark</color> <color name="widget_background_follow_system">@color/md_background_dark</color>
<color name="icon_tint">@color/icon_tint_dark</color> <color name="icon_tint">@color/icon_tint_dark</color>
<color name="icon_tint_with_alpha">@color/icon_tint_dark_alpha</color> <color name="icon_tint_with_alpha">@color/icon_tint_dark_alpha</color>

@ -1,18 +1,29 @@
<resources> <resources>
<style name="DayNight" parent="Theme.MaterialComponents.NoActionBar"/> <style name="DayNight" parent="Theme.Material3.Dark.NoActionBar"/>
<style name="DayNightDialog" parent="Theme.MaterialComponents.Dialog"/> <style name="DayNightDialog" parent="Theme.Material3.Dark.Dialog"/>
<style name="DayNightAlert" parent="ThemeOverlay.MaterialComponents.Dialog.Alert"/> <style name="DayNightAlert" parent="ThemeOverlay.Material3.Dialog.Alert"/>
<style name="popup_overlay" parent="ThemeOverlay.MaterialComponents"/> <style name="ToolbarTheme" parent="ThemeOverlay.Material3.Dark">
<item name="toolbarNavigationButtonStyle">@style/WhiteNavigation</item>
<item name="iconTint">?attr/colorOnSurface</item>
<item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
<item name="android:editTextColor">@color/text_primary</item>
<item name="android:textColorHint">@color/text_secondary</item>
</style>
<!-- Location picker -->
<style name="popup_overlay" parent="ThemeOverlay.MaterialComponents.Dark"/>
<style name="ToolbarTheme" parent="@style/ThemeOverlay.MaterialComponents.Dark"> <style name="LegacyToolbarTheme" parent="ThemeOverlay.MaterialComponents.Dark">
<item name="toolbarNavigationButtonStyle">@style/WhiteNavigation</item> <item name="toolbarNavigationButtonStyle">@style/WhiteNavigation</item>
<item name="iconTint">@color/text_primary</item> <item name="iconTint">?attr/colorOnSurface</item>
<item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item> <item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
<item name="android:editTextColor">@color/text_primary</item> <item name="android:editTextColor">@color/text_primary</item>
<item name="android:textColorHint">@color/text_secondary</item> <item name="android:textColorHint">@color/text_secondary</item>
</style> </style>
<!-- -->
</resources> </resources>

@ -380,7 +380,6 @@
<string name="location_radius_meters">%s m</string> <string name="location_radius_meters">%s m</string>
<string name="filters">Filters</string> <string name="filters">Filters</string>
<string name="filter">Filter</string> <string name="filter">Filter</string>
<string name="accent">Accent</string>
<string name="button_unsubscribe">Abonnement opzeggen</string> <string name="button_unsubscribe">Abonnement opzeggen</string>
<string name="name_your_price">Bepaal je eigen prijs</string> <string name="name_your_price">Bepaal je eigen prijs</string>
<string name="restart_later">Later</string> <string name="restart_later">Later</string>

@ -296,7 +296,6 @@
<string name="opacity">Nieprzezroczystość</string> <string name="opacity">Nieprzezroczystość</string>
<string name="theme">Motyw</string> <string name="theme">Motyw</string>
<string name="color">Kolor</string> <string name="color">Kolor</string>
<string name="accent">Akcent</string>
<string name="launcher_icon">Ikona programu startowego</string> <string name="launcher_icon">Ikona programu startowego</string>
<string name="theme_black">Czarny</string> <string name="theme_black">Czarny</string>
<string name="theme_light">Jasny</string> <string name="theme_light">Jasny</string>

@ -294,7 +294,6 @@
<string name="opacity">Opacidade</string> <string name="opacity">Opacidade</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Cor</string> <string name="color">Cor</string>
<string name="accent">Cor de destaque</string>
<string name="launcher_icon">Ícone do lançador</string> <string name="launcher_icon">Ícone do lançador</string>
<string name="theme_black">Preto</string> <string name="theme_black">Preto</string>
<string name="theme_light">Claro</string> <string name="theme_light">Claro</string>

@ -267,7 +267,6 @@
<string name="opacity">Opacidade</string> <string name="opacity">Opacidade</string>
<string name="theme">Tema</string> <string name="theme">Tema</string>
<string name="color">Cor</string> <string name="color">Cor</string>
<string name="accent">Destaque</string>
<string name="theme_black">Preto</string> <string name="theme_black">Preto</string>
<string name="theme_light">Claro</string> <string name="theme_light">Claro</string>
<string name="theme_dark">Escuro</string> <string name="theme_dark">Escuro</string>

@ -9,7 +9,6 @@
<string name="email">E-mail</string> <string name="email">E-mail</string>
<string name="picker_mode_calendar">Calendar</string> <string name="picker_mode_calendar">Calendar</string>
<string name="compact">Compact</string> <string name="compact">Compact</string>
<string name="accent">Accent</string>
<string name="TEA_timer_est">Estim. %s</string> <string name="TEA_timer_est">Estim. %s</string>
<string name="TEA_control_gcal">Calendar</string> <string name="TEA_control_gcal">Calendar</string>
<string name="export_toast">Salvat %1$s în %2$s.</string> <string name="export_toast">Salvat %1$s în %2$s.</string>

@ -298,7 +298,6 @@
<string name="opacity">Непрозрачность</string> <string name="opacity">Непрозрачность</string>
<string name="theme">Цветовая тема</string> <string name="theme">Цветовая тема</string>
<string name="color">Цвет</string> <string name="color">Цвет</string>
<string name="accent">Акцент</string>
<string name="launcher_icon">Иконка запуска</string> <string name="launcher_icon">Иконка запуска</string>
<string name="theme_black">Чёрная</string> <string name="theme_black">Чёрная</string>
<string name="theme_light">Светлая</string> <string name="theme_light">Светлая</string>

@ -394,7 +394,6 @@
<string name="repeats_single">පුනරාවර්තනය %s</string> <string name="repeats_single">පුනරාවර්තනය %s</string>
<string name="repeats_from">පුනරාවර්තනය වනුයේ</string> <string name="repeats_from">පුනරාවර්තනය වනුයේ</string>
<string name="bundle_notifications">බහු දැනුම්දීම්</string> <string name="bundle_notifications">බහු දැනුම්දීම්</string>
<string name="accent">දෙවන වර්ණය</string>
<string name="date_shortcut_must_come_after">%1$s, %2$s ට පසුව පැමිණිය යුතුය</string> <string name="date_shortcut_must_come_after">%1$s, %2$s ට පසුව පැමිණිය යුතුය</string>
<string name="date_shortcut_must_come_before">%2$s පෙර %1$s පැමිණිය යුතුය</string> <string name="date_shortcut_must_come_before">%2$s පෙර %1$s පැමිණිය යුතුය</string>
<string name="rmd_EPr_quiet_hours_end_title">නිහඬ කාලය අවසානය</string> <string name="rmd_EPr_quiet_hours_end_title">නිහඬ කාලය අවසානය</string>

@ -301,7 +301,6 @@
<string name="opacity">Priehľadnosť</string> <string name="opacity">Priehľadnosť</string>
<string name="theme">Téma</string> <string name="theme">Téma</string>
<string name="color">Farba</string> <string name="color">Farba</string>
<string name="accent">Zvýraznenie </string>
<string name="launcher_icon">Ikona</string> <string name="launcher_icon">Ikona</string>
<string name="theme_black">Čierna</string> <string name="theme_black">Čierna</string>
<string name="theme_light">Svetlá</string> <string name="theme_light">Svetlá</string>

@ -300,7 +300,6 @@
<string name="url_host_name_required">Värddatornamn krävs</string> <string name="url_host_name_required">Värddatornamn krävs</string>
<string name="url_invalid_scheme">Måste börja med http(s)://</string> <string name="url_invalid_scheme">Måste börja med http(s)://</string>
<string name="filter">Filter</string> <string name="filter">Filter</string>
<string name="accent">Accent</string>
<string name="launcher_icon">Hemskärmsikon</string> <string name="launcher_icon">Hemskärmsikon</string>
<string name="widget_header_settings">Överskriftsinställningar</string> <string name="widget_header_settings">Överskriftsinställningar</string>
<string name="widget_row_settings">Radinställningar</string> <string name="widget_row_settings">Radinställningar</string>

@ -303,7 +303,6 @@
<string name="theme_dark">இருள்</string> <string name="theme_dark">இருள்</string>
<string name="theme_light">ஒளி</string> <string name="theme_light">ஒளி</string>
<string name="theme_black">கருப்பு</string> <string name="theme_black">கருப்பு</string>
<string name="accent">உச்சரிப்பு</string>
<string name="icon">உருவம்</string> <string name="icon">உருவம்</string>
<string name="color">நிறம்</string> <string name="color">நிறம்</string>
<string name="theme">பேசும்</string> <string name="theme">பேசும்</string>

@ -287,7 +287,6 @@
<string name="theme_light">แสง</string> <string name="theme_light">แสง</string>
<string name="theme_black">ดำ</string> <string name="theme_black">ดำ</string>
<string name="launcher_icon">ไอคอนตัวเปิดใช้</string> <string name="launcher_icon">ไอคอนตัวเปิดใช้</string>
<string name="accent">สำเนียง</string>
<string name="icon">ไอคอน</string> <string name="icon">ไอคอน</string>
<string name="color">สี</string> <string name="color">สี</string>
<string name="theme">หัวข้อ</string> <string name="theme">หัวข้อ</string>

@ -287,7 +287,6 @@
<string name="opacity">Şeffaflık</string> <string name="opacity">Şeffaflık</string>
<string name="theme">Gövde</string> <string name="theme">Gövde</string>
<string name="color">Renk</string> <string name="color">Renk</string>
<string name="accent">Ara renk</string>
<string name="launcher_icon">Başlatıcı simgesi</string> <string name="launcher_icon">Başlatıcı simgesi</string>
<string name="theme_black">Siyah</string> <string name="theme_black">Siyah</string>
<string name="theme_light">ık</string> <string name="theme_light">ık</string>

@ -298,7 +298,6 @@
<string name="opacity">Прозорість</string> <string name="opacity">Прозорість</string>
<string name="theme">Тема</string> <string name="theme">Тема</string>
<string name="color">Колір</string> <string name="color">Колір</string>
<string name="accent">Акцент</string>
<string name="launcher_icon">Піктограма запуску</string> <string name="launcher_icon">Піктограма запуску</string>
<string name="theme_black">Чорна</string> <string name="theme_black">Чорна</string>
<string name="theme_light">Світла</string> <string name="theme_light">Світла</string>

@ -332,7 +332,6 @@
<string name="theme_light">سفید</string> <string name="theme_light">سفید</string>
<string name="theme_black">سیاہ</string> <string name="theme_black">سیاہ</string>
<string name="launcher_icon">لانچر آئیکن</string> <string name="launcher_icon">لانچر آئیکن</string>
<string name="accent">ایکسنٹ</string>
<string name="icon">آئیکن</string> <string name="icon">آئیکن</string>
<string name="color">رنگ</string> <string name="color">رنگ</string>
<string name="theme">تھیم</string> <string name="theme">تھیم</string>

@ -338,7 +338,6 @@
<string name="theme_light">Sáng</string> <string name="theme_light">Sáng</string>
<string name="theme_black">Đen</string> <string name="theme_black">Đen</string>
<string name="launcher_icon">Biểu tượng trên launcher</string> <string name="launcher_icon">Biểu tượng trên launcher</string>
<string name="accent">Màu nổi bật</string>
<string name="icon">Biểu tượng</string> <string name="icon">Biểu tượng</string>
<string name="color">Màu</string> <string name="color">Màu</string>
<string name="theme">Chủ đề</string> <string name="theme">Chủ đề</string>

@ -268,7 +268,6 @@
<string name="opacity">不透明度</string> <string name="opacity">不透明度</string>
<string name="theme">主题</string> <string name="theme">主题</string>
<string name="color">颜色</string> <string name="color">颜色</string>
<string name="accent">强调色</string>
<string name="launcher_icon">启动器图标</string> <string name="launcher_icon">启动器图标</string>
<string name="theme_black">黑色</string> <string name="theme_black">黑色</string>
<string name="theme_light">亮色</string> <string name="theme_light">亮色</string>

@ -143,7 +143,6 @@
<string name="opacity">透明度</string> <string name="opacity">透明度</string>
<string name="theme">主題</string> <string name="theme">主題</string>
<string name="color">色彩</string> <string name="color">色彩</string>
<string name="accent">強調色</string>
<string name="language">語言</string> <string name="language">語言</string>
<string name="restart_required">重新啟動 Tasks以使變更生效</string> <string name="restart_required">重新啟動 Tasks以使變更生效</string>
<string name="restart_now">馬上重新啟動</string> <string name="restart_now">馬上重新啟動</string>

@ -1,140 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AmberAccent" parent="BlackTint">
<item name="colorSecondary">@color/amber_a400</item>
</style>
<style name="BlueAccent" parent="WhiteTint">
<item name="colorSecondary">@color/blue_a400</item>
</style>
<style name="BlueGreyAccent" parent="WhiteTint">
<item name="colorSecondary">@color/blue_grey_400</item>
</style>
<style name="CyanAccent" parent="BlackTint">
<item name="colorSecondary">@color/cyan_a400</item>
</style>
<style name="DeepOrangeAccent" parent="WhiteTint">
<item name="colorSecondary">@color/deep_orange_a400</item>
</style>
<style name="DeepPurpleAccent" parent="WhiteTint">
<item name="colorSecondary">@color/deep_purple_a400</item>
</style>
<style name="GreenAccent" parent="BlackTint">
<item name="colorSecondary">@color/green_a400</item>
</style>
<style name="IndigoAccent" parent="WhiteTint">
<item name="colorSecondary">@color/indigo_a400</item>
</style>
<style name="LightBlueAccent" parent="BlackTint">
<item name="colorSecondary">@color/light_blue_a400</item>
</style>
<style name="LightGreenAccent" parent="BlackTint">
<item name="colorSecondary">@color/light_green_a400</item>
</style>
<style name="LimeAccent" parent="BlackTint">
<item name="colorSecondary">@color/lime_a400</item>
</style>
<style name="OrangeAccent" parent="BlackTint">
<item name="colorSecondary">@color/orange_a400</item>
</style>
<style name="PinkAccent" parent="WhiteTint">
<item name="colorSecondary">@color/pink_a400</item>
</style>
<style name="PurpleAccent" parent="WhiteTint">
<item name="colorSecondary">@color/purple_a400</item>
</style>
<style name="RedAccent" parent="WhiteTint">
<item name="colorSecondary">@color/red_a400</item>
</style>
<style name="TealAccent" parent="BlackTint">
<item name="colorSecondary">@color/teal_a400</item>
</style>
<style name="YellowAccent" parent="BlackTint">
<item name="colorSecondary">@color/yellow_a400</item>
</style>
<style name="AmberAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/amber_a100</item>
</style>
<style name="BlueAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/blue_a100</item>
</style>
<style name="BlueGreyAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/blue_grey_100</item>
</style>
<style name="CyanAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/cyan_a100</item>
</style>
<style name="DeepOrangeAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/deep_orange_a100</item>
</style>
<style name="DeepPurpleAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/deep_purple_a100</item>
</style>
<style name="GreenAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/green_a100</item>
</style>
<style name="IndigoAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/indigo_a100</item>
</style>
<style name="LightBlueAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/light_blue_a100</item>
</style>
<style name="LightGreenAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/light_green_a100</item>
</style>
<style name="LimeAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/lime_a100</item>
</style>
<style name="OrangeAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/orange_a100</item>
</style>
<style name="PinkAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/pink_a100</item>
</style>
<style name="PurpleAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/purple_a100</item>
</style>
<style name="RedAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/red_a100</item>
</style>
<style name="TealAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/teal_a100</item>
</style>
<style name="YellowAccentDesaturated" parent="BlackTint">
<item name="colorSecondary">@color/yellow_a100</item>
</style>
</resources>

@ -37,7 +37,7 @@
<color name="window_background">@color/md_background_light</color> <color name="window_background">@color/md_background_light</color>
<color name="content_background">@color/md_background_light</color> <color name="content_background">@color/md_background_light</color>
<color name="dialog_background">@color/md_background_light</color> <color name="dialog_background">#FFEAEFF1</color>
<color name="widget_background_follow_system">@color/md_background_light</color> <color name="widget_background_follow_system">@color/md_background_light</color>
<color name="icon_tint">@color/icon_tint_light</color> <color name="icon_tint">@color/icon_tint_light</color>
<color name="icon_tint_with_alpha">@color/icon_tint_light_alpha</color> <color name="icon_tint_with_alpha">@color/icon_tint_light_alpha</color>

@ -317,7 +317,6 @@
<string name="tasker_locale">Tasker/Locale</string> <string name="tasker_locale">Tasker/Locale</string>
<string name="p_theme">theme_style</string> <string name="p_theme">theme_style</string>
<string name="p_theme_color">theme_color</string> <string name="p_theme_color">theme_color</string>
<string name="p_theme_accent">theme_accent</string>
<string name="p_theme_launcher">theme_launcher</string> <string name="p_theme_launcher">theme_launcher</string>
<string name="p_language">language</string> <string name="p_language">language</string>
<string name="p_led_notification">led_notificatiWCAon</string> <string name="p_led_notification">led_notificatiWCAon</string>

@ -385,7 +385,6 @@ File %1$s contained %2$s.\n\n
<string name="theme">Theme</string> <string name="theme">Theme</string>
<string name="color">Color</string> <string name="color">Color</string>
<string name="icon">Icon</string> <string name="icon">Icon</string>
<string name="accent">Accent</string>
<string name="launcher_icon">Launcher icon</string> <string name="launcher_icon">Launcher icon</string>
<string name="theme_black">Black</string> <string name="theme_black">Black</string>
<string name="theme_light">Light</string> <string name="theme_light">Light</string>

@ -1,7 +1,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<style name="popup_overlay" parent="ThemeOverlay.MaterialComponents.Light"/>
<style name="SpinnerNoPadding" parent="Widget.AppCompat.TextView.SpinnerItem"> <style name="SpinnerNoPadding" parent="Widget.AppCompat.TextView.SpinnerItem">
<item name="android:paddingStart">0dp</item> <item name="android:paddingStart">0dp</item>
<item name="android:paddingEnd">0dp</item> <item name="android:paddingEnd">0dp</item>
@ -20,8 +18,6 @@
<item name="materialAlertDialogTheme">@style/TasksDialogAlert</item> <item name="materialAlertDialogTheme">@style/TasksDialogAlert</item>
<item name="android:windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item> <item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="materialTimePickerTheme">@style/ClockTheme</item>
<item name="materialCalendarTheme">@style/CalendarTheme</item>
<item name="textInputStyle">@style/OutlinedBox</item> <item name="textInputStyle">@style/OutlinedBox</item>
</style> </style>
@ -33,7 +29,7 @@
<item name="android:windowIsFloating">false</item> <item name="android:windowIsFloating">false</item>
</style> </style>
<style name="ToolbarTheme" parent="ThemeOverlay.MaterialComponents.Light"> <style name="ToolbarTheme" parent="ThemeOverlay.Material3.Light">
<item name="toolbarNavigationButtonStyle">@style/BlackNavigation</item> <item name="toolbarNavigationButtonStyle">@style/BlackNavigation</item>
<item name="iconTint">@color/text_primary</item> <item name="iconTint">@color/text_primary</item>
<item name="android:actionOverflowButtonStyle">@style/BlackOverflow</item> <item name="android:actionOverflowButtonStyle">@style/BlackOverflow</item>
@ -41,30 +37,6 @@
<item name="android:textColorHint">@color/text_secondary</item> <item name="android:textColorHint">@color/text_secondary</item>
</style> </style>
<style name="WhiteToolbarTheme">
<item name="overlay_theme">@style/WhiteToolbarOverlay</item>
<item name="iconTint">@color/white_100</item>
<item name="colorOnPrimary">@color/white_100</item>
<item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
<item name="toolbarNavigationButtonStyle">@style/WhiteNavigation</item>
</style>
<style name="BlackToolbarTheme">
<item name="overlay_theme">@style/BlackToolbarOverlay</item>
<item name="iconTint">@color/black_87</item>
<item name="colorOnPrimary">@color/black_87</item>
<item name="android:actionOverflowButtonStyle">@style/BlackOverflow</item>
<item name="toolbarNavigationButtonStyle">@style/BlackNavigation</item>
</style>
<style name="WhiteTint">
<item name="colorOnSecondary">@color/white_100</item>
</style>
<style name="BlackTint">
<item name="colorOnSecondary">@color/black_87</item>
</style>
<style name="WhiteNavigation" parent="Widget.AppCompat.Toolbar.Button.Navigation"> <style name="WhiteNavigation" parent="Widget.AppCompat.Toolbar.Button.Navigation">
<item name="android:tint">@color/white_100</item> <item name="android:tint">@color/white_100</item>
</style> </style>
@ -103,18 +75,6 @@
<item name="android:tint">@color/black_100</item> <item name="android:tint">@color/black_100</item>
</style> </style>
<style name="WhiteToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="colorControlNormal">@color/white_100</item>
<item name="android:textColorHint">@color/white_60</item>
<item name="android:editTextColor">@color/white_100</item>
</style>
<style name="BlackToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="colorControlNormal">@color/black_87</item>
<item name="android:textColorHint">@color/black_87</item>
<item name="android:editTextColor">@color/black_87</item>
</style>
<style name="TagSettingsRow" parent="Widget.Design.TextInputLayout"> <style name="TagSettingsRow" parent="Widget.Design.TextInputLayout">
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
<item name="android:clickable">true</item> <item name="android:clickable">true</item>
@ -134,13 +94,13 @@
<!--================================================== General == --> <!--================================================== General == -->
<style name="TextAppearance" parent="TextAppearance.MaterialComponents.Body1"> <style name="TextAppearance" parent="TextAppearance.Material3.BodyMedium">
<item name="android:textColor">@color/text_primary</item> <item name="android:textColor">@color/text_primary</item>
</style> </style>
<style name="DateTimeShortcuts" parent="Widget.MaterialComponents.Button.TextButton"> <style name="DateTimeShortcuts" parent="Widget.Material3.Button.TextButton">
<item name="android:textColor">@color/button_accent_text</item> <item name="android:textColor">@color/button_accent_text</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Body1</item> <item name="android:textAppearance">@style/TextAppearance.Material3.BodyMedium</item>
<item name="android:paddingTop">@dimen/quarter_keyline_first</item> <item name="android:paddingTop">@dimen/quarter_keyline_first</item>
<item name="android:paddingBottom">@dimen/quarter_keyline_first</item> <item name="android:paddingBottom">@dimen/quarter_keyline_first</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
@ -177,7 +137,7 @@
<item name="android:elevation" tools:ignore="NewApi">@dimen/elevation_refresh_indicator</item> <item name="android:elevation" tools:ignore="NewApi">@dimen/elevation_refresh_indicator</item>
</style> </style>
<style name="AlertButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog.Flush"> <style name="AlertButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog.Flush">
<item name="android:textColor">?attr/colorSecondary</item> <item name="android:textColor">?attr/colorSecondary</item>
</style> </style>
@ -199,60 +159,23 @@
<item name="android:scaleType">fitCenter</item> <item name="android:scaleType">fitCenter</item>
</style> </style>
<style name="ClockTheme" parent="ThemeOverlay.MaterialComponents.TimePicker"> <style name="OutlinedBox" parent="Widget.Material3.TextInputLayout.FilledBox">
<item name="materialClockStyle">@style/ClockStyle</item> <item name="boxStrokeColor">?attr/colorSecondary</item>
</style>
<style name="ClockStyle" parent="Widget.MaterialComponents.TimePicker.Clock">
<item name="clockHandColor">?attr/colorSecondary</item>
<item name="clockNumberTextColor">@color/clock_text_color</item>
</style>
<style name="CalendarTheme" parent="@style/ThemeOverlay.MaterialComponents.MaterialCalendar">
<item name="materialCalendarStyle">@style/CalendarStyle</item>
<item name="materialCalendarHeaderLayout">@style/CalendarHeaderLayout</item>
<item name="materialCalendarHeaderDivider">@style/CalendarHeaderDivider</item>
<item name="materialCalendarHeaderTitle">@style/CalendarHeaderTitle</item>
<item name="materialCalendarHeaderSelection">@style/CalendarHeaderSelection</item>
<item name="android:colorControlActivated">?attr/colorSecondary</item>
</style>
<style name="CalendarStyle" parent="@style/Widget.MaterialComponents.MaterialCalendar">
<item name="daySelectedStyle">@style/CalendarDaySelected</item>
<item name="yearSelectedStyle">@style/CalendarYearSelected</item>
<item name="hintTextColor">?attr/colorSecondary</item> <item name="hintTextColor">?attr/colorSecondary</item>
</style> </style>
<style name="CalendarHeaderLayout" parent="Widget.MaterialComponents.MaterialCalendar.HeaderLayout"> <!-- Location picker -->
<item name="android:background">?attr/colorSecondary</item>
</style>
<style name="CalendarHeaderDivider" parent="Widget.MaterialComponents.MaterialCalendar.HeaderDivider">
<item name="android:background">?attr/colorOnSecondary</item>
</style>
<style name="CalendarHeaderTitle" parent="Widget.MaterialComponents.MaterialCalendar.HeaderTitle">
<item name="android:textColor">?attr/colorOnSecondary</item>
</style>
<style name="CalendarHeaderSelection" parent="Widget.MaterialComponents.MaterialCalendar.HeaderSelection">
<item name="android:textColor">?attr/colorOnSecondary</item>
</style>
<style name="CalendarDaySelected" parent="Widget.MaterialComponents.MaterialCalendar.Day.Selected"> <style name="popup_overlay" parent="ThemeOverlay.MaterialComponents.Light"/>
<item name="itemFillColor">?attr/colorSecondary</item>
<item name="itemTextColor">?attr/colorOnSecondary</item>
</style>
<style name="CalendarYearSelected" parent="Widget.MaterialComponents.MaterialCalendar.Year.Selected"> <style name="LegacyToolbarTheme" parent="ThemeOverlay.MaterialComponents.Light">
<item name="itemFillColor">?attr/colorSecondary</item> <item name="toolbarNavigationButtonStyle">@style/BlackNavigation</item>
<item name="itemTextColor">?attr/colorOnSecondary</item> <item name="iconTint">@color/text_primary</item>
<item name="itemStrokeColor">?attr/colorOnSecondary</item> <item name="android:actionOverflowButtonStyle">@style/BlackOverflow</item>
<item name="android:editTextColor">@color/text_primary</item>
<item name="android:textColorHint">@color/text_secondary</item>
</style> </style>
<style name="OutlinedBox" parent="Widget.MaterialComponents.TextInputLayout.FilledBox"> <!---->
<item name="boxStrokeColor">?attr/colorSecondary</item>
<item name="hintTextColor">?attr/colorSecondary</item>
</style>
</resources> </resources>

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="DayNight" parent="Theme.MaterialComponents.Light.NoActionBar" /> <style name="DayNight" parent="Theme.Material3.Light.NoActionBar" />
<style name="DayNightDialog" parent="Theme.MaterialComponents.Light.Dialog" /> <style name="DayNightDialog" parent="Theme.Material3.Light.Dialog" />
<style name="DayNightAlert" parent="ThemeOverlay.MaterialComponents.Dialog.Alert" /> <style name="DayNightAlert" parent="ThemeOverlay.Material3.Dialog.Alert" />
<style name="TasksBase" parent="DayNight"> <style name="TasksBase" parent="DayNight">
<item name="android:windowBackground">@color/window_background</item> <item name="android:windowBackground">@color/window_background</item>
<item name="android:colorBackground">@color/content_background</item> <item name="android:colorBackground">@color/content_background</item>
<item name="background">@color/window_background</item>
<item name="colorSurface">@color/content_background</item>
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="actionModeStyle">@style/ActionModeStyle</item> <item name="actionModeStyle">@style/ActionModeStyle</item>
<item name="actionBarTheme">@style/ActionModeTheme</item> <item name="actionBarTheme">@style/ActionModeTheme</item>
@ -24,8 +26,6 @@
<item name="android:textColorSecondary">@color/text_secondary</item> <item name="android:textColorSecondary">@color/text_secondary</item>
<item name="android:textColorTertiary">@color/text_tertiary</item> <item name="android:textColorTertiary">@color/text_tertiary</item>
<item name="horizontal_divider_visibility">2</item> <!-- View.GONE --> <item name="horizontal_divider_visibility">2</item> <!-- View.GONE -->
<item name="materialTimePickerTheme">@style/ClockTheme</item>
<item name="materialCalendarTheme">@style/CalendarTheme</item>
<item name="textInputStyle">@style/OutlinedBox</item> <item name="textInputStyle">@style/OutlinedBox</item>
</style> </style>
@ -48,12 +48,16 @@
<style name="ThemeBlack" parent="Tasks"> <style name="ThemeBlack" parent="Tasks">
<item name="android:windowBackground">@android:color/black</item> <item name="android:windowBackground">@android:color/black</item>
<item name="android:colorBackground">@android:color/black</item> <item name="android:colorBackground">@android:color/black</item>
<item name="background">@android:color/black</item>
<item name="colorSurface">@android:color/black</item>
<item name="horizontal_divider_visibility">0</item> <!-- View.VISIBLE --> <item name="horizontal_divider_visibility">0</item> <!-- View.VISIBLE -->
</style> </style>
<style name="Wallpaper" parent="Tasks"> <style name="Wallpaper" parent="Tasks">
<item name="android:windowBackground">@color/black_38</item> <item name="android:windowBackground">@color/black_60</item>
<item name="android:colorBackground">@color/black_60</item> <item name="android:colorBackground">@color/black_60</item>
<item name="background">@color/black_60</item>
<item name="colorSurface">@color/black_60</item>
<item name="android:windowShowWallpaper">true</item> <item name="android:windowShowWallpaper">true</item>
</style> </style>

@ -11,10 +11,6 @@
android:key="@string/p_theme_color" android:key="@string/p_theme_color"
android:title="@string/color" /> android:title="@string/color" />
<Preference
android:key="@string/p_theme_accent"
android:title="@string/accent" />
<Preference <Preference
android:key="@string/p_theme_launcher" android:key="@string/p_theme_launcher"
android:title="@string/launcher_icon" /> android:title="@string/launcher_icon" />

@ -0,0 +1,26 @@
package org.tasks.kmp.org.tasks.compose
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.ime
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.State
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalDensity
import co.touchlab.kermit.Logger
@Composable
fun rememberImeState(): State<Boolean> {
val density = LocalDensity.current
val ime = WindowInsets.ime
val imeState = remember {
derivedStateOf {
ime.getBottom(density) > 0
}
}
LaunchedEffect(imeState.value) {
Logger.d("imeState") { "keyboardOpen=${imeState.value}" }
}
return imeState
}

@ -0,0 +1,22 @@
package org.tasks.kmp.org.tasks.compose
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.platform.LocalViewConfiguration
import androidx.compose.ui.platform.ViewConfiguration
@Composable
fun TouchSlopMultiplier(
multiplier: Float = 3f,
content: @Composable () -> Unit,
) {
val current = LocalViewConfiguration.current
val viewConfiguration = object : ViewConfiguration by current {
override val touchSlop: Float
get() = current.touchSlop * multiplier
}
CompositionLocalProvider(LocalViewConfiguration provides viewConfiguration) {
content()
}
}

@ -24,6 +24,8 @@ import androidx.compose.ui.focus.focusProperties
import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
val SEARCH_BAR_HEIGHT = 56.dp
@Composable @Composable
fun SearchBar( fun SearchBar(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
@ -37,7 +39,7 @@ fun SearchBar(
OutlinedTextField( OutlinedTextField(
shape = MaterialTheme.shapes.medium, shape = MaterialTheme.shapes.medium,
modifier = modifier modifier = modifier
.height(56.dp) .height(SEARCH_BAR_HEIGHT)
.focusProperties { .focusProperties {
this.canFocus = canFocus this.canFocus = canFocus
}, },

@ -12,11 +12,14 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
@ -50,6 +53,7 @@ import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.layout.layout import androidx.compose.ui.layout.layout
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.ImmutableList
@ -58,6 +62,7 @@ import org.tasks.compose.components.Chevron
import org.tasks.compose.components.SearchBar import org.tasks.compose.components.SearchBar
import org.tasks.compose.components.TasksIcon import org.tasks.compose.components.TasksIcon
import org.tasks.kmp.formatNumber import org.tasks.kmp.formatNumber
import org.tasks.kmp.org.tasks.compose.rememberImeState
import tasks.kmp.generated.resources.Res import tasks.kmp.generated.resources.Res
import tasks.kmp.generated.resources.help_and_feedback import tasks.kmp.generated.resources.help_and_feedback
import tasks.kmp.generated.resources.search import tasks.kmp.generated.resources.search
@ -65,6 +70,9 @@ import tasks.kmp.generated.resources.settings
import tasks.kmp.generated.resources.subscribe import tasks.kmp.generated.resources.subscribe
import kotlin.math.roundToInt import kotlin.math.roundToInt
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
private val SEARCH_BAR_BOTTOM_PADDING = androidx.compose.material3.OutlinedTextFieldTopPadding
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
fun TaskListDrawer( fun TaskListDrawer(
@ -90,16 +98,17 @@ fun TaskListDrawer(
bottomBar = { bottomBar = {
if (bottomSearchBar) { if (bottomSearchBar) {
BottomAppBar( BottomAppBar(
modifier = Modifier.layout { measurable, constraints -> modifier = Modifier
val placeable = measurable.measure(constraints) .layout { measurable, constraints ->
bottomAppBarScrollBehavior.state.heightOffsetLimit = val placeable = measurable.measure(constraints)
-placeable.height.toFloat() bottomAppBarScrollBehavior.state.heightOffsetLimit =
val height = -placeable.height.toFloat()
placeable.height + bottomAppBarScrollBehavior.state.heightOffset val height =
layout(placeable.width, height.roundToInt().coerceAtLeast(0)) { placeable.height + bottomAppBarScrollBehavior.state.heightOffset
placeable.place(0, 0) layout(placeable.width, height.roundToInt().coerceAtLeast(0)) {
} placeable.place(0, 0)
}, }
},
containerColor = MaterialTheme.colorScheme.surface, containerColor = MaterialTheme.colorScheme.surface,
scrollBehavior = bottomAppBarScrollBehavior scrollBehavior = bottomAppBarScrollBehavior
) { ) {
@ -122,10 +131,14 @@ fun TaskListDrawer(
) )
} }
} }
) { paddingValues -> ) { contentPadding ->
val keyboardOpen = rememberImeState().value
LazyColumn( LazyColumn(
modifier = Modifier.fillMaxSize().imePadding(), modifier = Modifier.fillMaxSize(),
contentPadding = paddingValues, contentPadding = if (keyboardOpen)
contentPadding
else
WindowInsets.systemBars.asPaddingValues(),
verticalArrangement = arrangement, verticalArrangement = arrangement,
) { ) {
items(items = filters, key = { it.key() }) { items(items = filters, key = { it.key() }) {
@ -275,6 +288,7 @@ fun RowScope.MenuSearchBar(
query: String, query: String,
onQueryChange: (String) -> Unit, onQueryChange: (String) -> Unit,
) { ) {
val density = LocalDensity.current
var hasFocus by remember { mutableStateOf(false) } var hasFocus by remember { mutableStateOf(false) }
SearchBar( SearchBar(
modifier = Modifier modifier = Modifier
@ -282,7 +296,7 @@ fun RowScope.MenuSearchBar(
.padding( .padding(
start = 8.dp, start = 8.dp,
end = if (hasFocus) 8.dp else 0.dp, end = if (hasFocus) 8.dp else 0.dp,
bottom = 4.dp bottom = with(density) { SEARCH_BAR_BOTTOM_PADDING.toDp() }
) )
.weight(1f) .weight(1f)
.animateContentSize( .animateContentSize(

@ -1,31 +1,26 @@
package org.tasks.themes package org.tasks.themes
import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.luminance
import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.graphics.toArgb
import org.tasks.kmp.org.tasks.themes.ColorProvider.saturated import org.tasks.kmp.org.tasks.themes.ColorProvider.saturated
const val BLUE = -14575885 const val BLUE = -14575885
const val WHITE = -1 const val WHITE = -1
@Composable
fun ColorScheme.isDark() = this.background.luminance() <= 0.5
private val lightColorScheme = lightColorScheme( private val lightColorScheme = lightColorScheme(
surface = Color.White, surface = Color(0xFFEAEFF1),
background = Color.White, background = Color.White,
) )
private val darkColorScheme = darkColorScheme( private val darkColorScheme = darkColorScheme(
surface = Color(0xFF202124), surface = Color(0xFF1B2023),
background = Color(0xFF202124), background = Color(0xFF0F1416),
) )
private val blackColorScheme = darkColorScheme.copy( private val blackColorScheme = darkColorScheme.copy(

Loading…
Cancel
Save