Rename the themes tab to launcher

As it contains other launcher preferences too - like keeping screen on 
wt cetera
This commit is contained in:
Finn M Glas 2020-08-17 11:49:24 +02:00
parent 916a25b4aa
commit 6a3145846e
No known key found for this signature in database
GPG key ID: 902A30146014DFBF
4 changed files with 12 additions and 12 deletions

View file

@ -13,7 +13,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter import androidx.fragment.app.FragmentPagerAdapter
import com.finnmglas.launcher.settings.actions.SettingsFragmentActions import com.finnmglas.launcher.settings.actions.SettingsFragmentActions
import com.finnmglas.launcher.settings.theme.SettingsFragmentTheme import com.finnmglas.launcher.settings.launcher.SettingsFragmentLauncher
import com.finnmglas.launcher.settings.meta.SettingsFragmentMeta import com.finnmglas.launcher.settings.meta.SettingsFragmentMeta
@ -23,7 +23,7 @@ var intendedSettingsPause = false // know when to close
* The [SettingsActivity] is a tabbed activity: * The [SettingsActivity] is a tabbed activity:
* *
* | Actions | Choose apps or intents to be launched | [SettingsFragmentActions] | * | Actions | Choose apps or intents to be launched | [SettingsFragmentActions] |
* | Theme | Select a theme / Customize | [SettingsFragmentTheme] | * | Theme | Select a theme / Customize | [SettingsFragmentLauncher] |
* | Meta | About Launcher / Contact etc. | [SettingsFragmentMeta] | * | Meta | About Launcher / Contact etc. | [SettingsFragmentMeta] |
* *
* Settings are closed automatically if the activity goes `onPause` unexpectedly. * Settings are closed automatically if the activity goes `onPause` unexpectedly.
@ -88,8 +88,8 @@ class SettingsActivity: AppCompatActivity(), UIObject {
private val TAB_TITLES = arrayOf( private val TAB_TITLES = arrayOf(
R.string.settings_tab_app, R.string.settings_tab_app,
R.string.settings_tab_theme, R.string.settings_tab_launcher,
R.string.settings_tab_launcher R.string.settings_tab_meta
) )
class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentManager) class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentManager)
@ -98,7 +98,7 @@ class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentMan
override fun getItem(position: Int): Fragment { override fun getItem(position: Int): Fragment {
return when (position){ return when (position){
0 -> SettingsFragmentActions() 0 -> SettingsFragmentActions()
1 -> SettingsFragmentTheme() 1 -> SettingsFragmentLauncher()
2 -> SettingsFragmentMeta() 2 -> SettingsFragmentMeta()
else -> Fragment() else -> Fragment()
} }

View file

@ -1,4 +1,4 @@
package com.finnmglas.launcher.settings.theme package com.finnmglas.launcher.settings.launcher
import android.Manifest import android.Manifest
import android.content.Intent import android.content.Intent
@ -19,11 +19,11 @@ import com.finnmglas.launcher.settings.intendedSettingsPause
import kotlinx.android.synthetic.main.settings_theme.* import kotlinx.android.synthetic.main.settings_theme.*
/** /**
* The [SettingsFragmentTheme] is a used as a tab in the SettingsActivity. * The [SettingsFragmentLauncher] is a used as a tab in the SettingsActivity.
* *
* It is used to change themes, select wallpapers ... theme related stuff * It is used to change themes, select wallpapers ... theme related stuff
*/ */
class SettingsFragmentTheme : Fragment(), UIObject { class SettingsFragmentLauncher : Fragment(), UIObject {
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, inflater: LayoutInflater, container: ViewGroup?,
@ -115,7 +115,7 @@ class SettingsFragmentTheme : Fragment(), UIObject {
setSwitchColor(settings_launcher_switch_screen_timeout, vibrantColor) setSwitchColor(settings_launcher_switch_screen_timeout, vibrantColor)
settings_theme_container.setBackgroundColor(dominantColor) settings_launcher_container.setBackgroundColor(dominantColor)
setButtonColor(settings_theme_finn_button_select, vibrantColor) setButtonColor(settings_theme_finn_button_select, vibrantColor)
setButtonColor(settings_theme_dark_button_select, vibrantColor) setButtonColor(settings_theme_dark_button_select, vibrantColor)
setButtonColor(settings_theme_custom_button_select, vibrantColor) setButtonColor(settings_theme_custom_button_select, vibrantColor)

View file

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
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:id="@+id/settings_theme_container" android:id="@+id/settings_launcher_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"

View file

@ -17,8 +17,8 @@
<string name="settings_title">Settings</string> <string name="settings_title">Settings</string>
<string name="settings_tab_app" translatable="false">Apps</string> <string name="settings_tab_app" translatable="false">Apps</string>
<string name="settings_tab_theme" translatable="false">Themes</string> <string name="settings_tab_launcher" translatable="false">Launcher</string>
<string name="settings_tab_launcher" translatable="false">Meta</string> <string name="settings_tab_meta" translatable="false">Meta</string>
<string name="settings_rate_google_play">Rate us on Google Play</string> <string name="settings_rate_google_play">Rate us on Google Play</string>
<string name="settings_show_tutorial">View Launcher Tutorial</string> <string name="settings_show_tutorial">View Launcher Tutorial</string>