mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 14:19:08 +00:00
move screens to subfolder
This commit is contained in:
parent
c7a12ad172
commit
c877e5e4bc
5 changed files with 36 additions and 4 deletions
|
@ -6,6 +6,8 @@ import android.content.ContextWrapper
|
|||
import androidx.activity.ComponentActivity
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.runtime.Composable
|
||||
import helium314.keyboard.settings.screens.createAboutPrefs
|
||||
import helium314.keyboard.settings.screens.createCorrectionPrefs
|
||||
|
||||
class AllPrefs(context: Context) {
|
||||
private val list = createPrefDefs(context)
|
||||
|
|
|
@ -9,6 +9,9 @@ import androidx.compose.ui.unit.LayoutDirection
|
|||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import helium314.keyboard.settings.screens.AboutScreen
|
||||
import helium314.keyboard.settings.screens.MainSettingsScreen
|
||||
import helium314.keyboard.settings.screens.TextCorrectionScreen
|
||||
|
||||
@Composable
|
||||
fun SettingsNavHost(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
package helium314.keyboard.settings
|
||||
package helium314.keyboard.settings.screens
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
|
@ -10,6 +10,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
|
@ -27,6 +28,14 @@ import helium314.keyboard.latin.settings.DebugSettings
|
|||
import helium314.keyboard.latin.utils.DeviceProtectedUtils
|
||||
import helium314.keyboard.latin.utils.Log
|
||||
import helium314.keyboard.latin.utils.SpannableStringUtils
|
||||
import helium314.keyboard.settings.AllPrefs
|
||||
import helium314.keyboard.settings.NonSettingsPrefs
|
||||
import helium314.keyboard.settings.PrefDef
|
||||
import helium314.keyboard.settings.Preference
|
||||
import helium314.keyboard.settings.SearchPrefScreen
|
||||
import helium314.keyboard.settings.SettingsActivity2
|
||||
import helium314.keyboard.settings.Theme
|
||||
import helium314.keyboard.settings.getActivity
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
@ -100,7 +109,7 @@ fun createAboutPrefs(context: Context) = listOf(
|
|||
+ ctx.getString(R.string.hidden_features_text) + "</a>")
|
||||
val message = ctx.getString(R.string.hidden_features_message, link)
|
||||
val dialogMessage = SpannableStringUtils.fromHtml(message)
|
||||
val builder = androidx.appcompat.app.AlertDialog.Builder(ctx)
|
||||
val builder = AlertDialog.Builder(ctx)
|
||||
.setIcon(R.drawable.ic_settings_about_hidden_features)
|
||||
.setTitle(R.string.hidden_features_title)
|
||||
.setMessage(dialogMessage)
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
package helium314.keyboard.settings
|
||||
package helium314.keyboard.settings.screens
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.View
|
||||
|
@ -25,6 +25,11 @@ import helium314.keyboard.latin.settings.LanguageSettingsFragment
|
|||
import helium314.keyboard.latin.settings.PreferencesSettingsFragment
|
||||
import helium314.keyboard.latin.settings.ToolbarSettingsFragment
|
||||
import helium314.keyboard.latin.utils.JniUtils
|
||||
import helium314.keyboard.settings.Preference
|
||||
import helium314.keyboard.settings.PreferenceCategory
|
||||
import helium314.keyboard.settings.SearchPrefScreen
|
||||
import helium314.keyboard.settings.Theme
|
||||
import helium314.keyboard.settings.getActivity
|
||||
|
||||
@Composable
|
||||
fun MainSettingsScreen(
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
package helium314.keyboard.settings
|
||||
package helium314.keyboard.settings.screens
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
|
@ -25,6 +25,19 @@ import helium314.keyboard.latin.settings.Settings
|
|||
import helium314.keyboard.latin.settings.UserDictionaryListFragment
|
||||
import helium314.keyboard.latin.utils.DeviceProtectedUtils
|
||||
import helium314.keyboard.latin.utils.Log
|
||||
import helium314.keyboard.settings.AllPrefs
|
||||
import helium314.keyboard.settings.ConfirmationDialog
|
||||
import helium314.keyboard.settings.ListPickerDialog
|
||||
import helium314.keyboard.settings.NonSettingsPrefs
|
||||
import helium314.keyboard.settings.PrefDef
|
||||
import helium314.keyboard.settings.Preference
|
||||
import helium314.keyboard.settings.PreferenceCategory
|
||||
import helium314.keyboard.settings.SearchPrefScreen
|
||||
import helium314.keyboard.settings.SettingsActivity2
|
||||
import helium314.keyboard.settings.SwitchPreference
|
||||
import helium314.keyboard.settings.Theme
|
||||
import helium314.keyboard.settings.getActivity
|
||||
import helium314.keyboard.settings.themeChanged
|
||||
|
||||
@Composable
|
||||
fun TextCorrectionScreen(
|
Loading…
Add table
Reference in a new issue