feat(settings): add instructions to enable Now Bar on Samsung
Closes #77
This commit is contained in:
@@ -59,6 +59,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalUriHandler
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
@@ -303,6 +304,30 @@ private fun SettingsScreen(
|
||||
) { showLocaleSheet = true }
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 36 && Build.MANUFACTURER == "samsung") {
|
||||
item {
|
||||
val uriHandler = LocalUriHandler.current
|
||||
Spacer(Modifier.height(14.dp))
|
||||
ClickableListItem(
|
||||
leadingContent = {
|
||||
Icon(
|
||||
painterResource(R.drawable.mobile_text),
|
||||
null
|
||||
)
|
||||
},
|
||||
headlineContent = { Text(stringResource(R.string.now_bar)) },
|
||||
trailingContent = {
|
||||
Icon(
|
||||
painterResource(R.drawable.open_in_browser),
|
||||
null
|
||||
)
|
||||
},
|
||||
items = 1,
|
||||
index = 0
|
||||
) { uriHandler.openUri("https://gist.github.com/nsh07/3b42969aef017d98f72b097f1eca8911") }
|
||||
}
|
||||
}
|
||||
|
||||
item { Spacer(Modifier.height(12.dp)) }
|
||||
|
||||
item {
|
||||
|
||||
26
app/src/main/res/drawable/mobile_text.xml
Normal file
26
app/src/main/res/drawable/mobile_text.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
~ Copyright (c) 2025 Nishant Mishra
|
||||
~
|
||||
~ This file is part of Tomato - a minimalist pomodoro timer for Android.
|
||||
~
|
||||
~ Tomato is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||
~ General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
~ License, or (at your option) any later version.
|
||||
~
|
||||
~ Tomato is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
~ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
~ Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with Tomato.
|
||||
~ If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="#e3e3e3"
|
||||
android:pathData="M280,920q-33,0 -56.5,-23.5T200,840v-720q0,-33 23.5,-56.5T280,40h400q33,0 56.5,23.5T760,120v124q18,7 29,22t11,34v80q0,19 -11,34t-29,22v404q0,33 -23.5,56.5T680,920L280,920ZM360,480h240q17,0 28.5,-11.5T640,440q0,-17 -11.5,-28.5T600,400L360,400q-17,0 -28.5,11.5T320,440q0,17 11.5,28.5T360,480Z" />
|
||||
</vector>
|
||||
@@ -124,4 +124,5 @@
|
||||
<string name="reset_data_dialog_title">Reset all stats?</string>
|
||||
<string name="reset_data_dialog_text">All saved stats will be deleted permanently. This cannot be undone.</string>
|
||||
<string name="back">Back</string>
|
||||
<string name="now_bar">Now Bar</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user