From 2ecabd4e8d0f1a95c539d3cdb4428fbb8c6c7130 Mon Sep 17 00:00:00 2001 From: Klaus-Hendrik Wolf Date: Tue, 3 Oct 2023 18:11:38 +0200 Subject: [PATCH 01/10] Add titles to configuration sub pages --- .../customize_app_drawer_app_list_fragment.xml | 15 ++++++++++++++- .../res/layout/customize_app_drawer_fragment.xml | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml index b039f51f..2e1587c6 100644 --- a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml +++ b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml @@ -11,6 +11,19 @@ android:layout_marginRight="8dp" tools:context=".ui.options.CustomizeAppDrawerFragment"> + + + + Date: Wed, 18 Oct 2023 21:19:09 +0200 Subject: [PATCH 02/10] Adds Back button to customization fragments --- .../ui/options/CustomiseAppsFragment.kt | 15 ++++++++- .../CustomizeAppDrawerAppListFragment.kt | 6 ++++ .../options/CustomizeQuickButtonsFragment.kt | 4 +++ .../ui/options/OptionsFragment.kt | 3 ++ app/src/main/res/drawable/ic_back.xml | 9 ++++++ .../res/layout/customise_apps_fragment.xml | 18 +++++++++-- ...customize_app_drawer_app_list_fragment.xml | 13 ++++++-- .../layout/customize_app_drawer_fragment.xml | 14 ++++++-- .../customize_quick_buttons_fragment.xml | 13 ++++++++ app/src/main/res/layout/options_fragment.xml | 32 +++++++++++++++---- 10 files changed, 112 insertions(+), 15 deletions(-) create mode 100644 app/src/main/res/drawable/ic_back.xml diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt index e690b75c..d411232f 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt @@ -1,5 +1,6 @@ package com.sduduzog.slimlauncher.ui.options +import android.content.Context import android.graphics.Canvas import android.os.Bundle import android.view.LayoutInflater @@ -12,19 +13,22 @@ import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView import com.sduduzog.slimlauncher.R import com.sduduzog.slimlauncher.adapters.CustomAppsAdapter +import com.sduduzog.slimlauncher.data.model.App import com.sduduzog.slimlauncher.models.CustomiseAppsViewModel import com.sduduzog.slimlauncher.models.HomeApp import com.sduduzog.slimlauncher.ui.dialogs.RemoveAllAppsDialog import com.sduduzog.slimlauncher.ui.dialogs.RenameAppDialog import com.sduduzog.slimlauncher.utils.BaseFragment +import com.sduduzog.slimlauncher.utils.OnAppClickedListener import com.sduduzog.slimlauncher.utils.OnItemActionListener import com.sduduzog.slimlauncher.utils.OnShitDoneToAppsListener import dagger.hilt.android.AndroidEntryPoint import kotlinx.android.synthetic.main.customise_apps_fragment.* +import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_back @AndroidEntryPoint -class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener { +class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener, OnAppClickedListener { override fun getFragmentView(): ViewGroup = customise_apps_fragment @@ -34,6 +38,15 @@ class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener { return inflater.inflate(R.layout.customise_apps_fragment, container, false) } + override fun onAppClicked(app: App) { + TODO("Not yet implemented") + } + override fun onActivityCreated(savedInstanceState: Bundle?) { + super.onActivityCreated(savedInstanceState) + customise_apps_fragment_back.setOnClickListener { + requireActivity().onBackPressed() + } + } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) val adapter = CustomAppsAdapter(this) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt index 0362c013..db2236a3 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt @@ -6,10 +6,13 @@ import android.view.View import android.view.ViewGroup import com.sduduzog.slimlauncher.R import com.sduduzog.slimlauncher.adapters.CustomizeAppDrawerAppsAdapter +import com.sduduzog.slimlauncher.data.model.App import com.sduduzog.slimlauncher.datasource.UnlauncherDataSource import com.sduduzog.slimlauncher.utils.BaseFragment import dagger.hilt.android.AndroidEntryPoint +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_back import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.* +import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_back import javax.inject.Inject @AndroidEntryPoint @@ -39,5 +42,8 @@ class CustomizeAppDrawerAppListFragment : BaseFragment() { customize_app_drawer_fragment_app_progress_bar.visibility = View.VISIBLE } } + customize_app_drawer_fragment_back.setOnClickListener { + requireActivity().onBackPressed() + } } } \ No newline at end of file diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt index 4cb120a4..e11d9846 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt @@ -11,6 +11,7 @@ import com.sduduzog.slimlauncher.ui.dialogs.ChooseQuickButtonDialog import com.sduduzog.slimlauncher.utils.BaseFragment import dagger.hilt.android.AndroidEntryPoint import kotlinx.android.synthetic.main.customize_quick_buttons_fragment.customize_quick_buttons_fragment +import kotlinx.android.synthetic.main.customize_quick_buttons_fragment.customize_quick_buttons_fragment_back import kotlinx.android.synthetic.main.customize_quick_buttons_fragment.customize_quick_buttons_fragment_center import kotlinx.android.synthetic.main.customize_quick_buttons_fragment.customize_quick_buttons_fragment_left import kotlinx.android.synthetic.main.customize_quick_buttons_fragment.customize_quick_buttons_fragment_right @@ -42,6 +43,9 @@ class CustomizeQuickButtonsFragment : BaseFragment() { .setImageResource(QuickButtonPreferencesRepository.RES_BY_ICON.getValue(prefs.rightButton.iconId)) } + customize_quick_buttons_fragment_back.setOnClickListener { + requireActivity().onBackPressed() + } customize_quick_buttons_fragment_left.setOnClickListener { ChooseQuickButtonDialog( prefsRepo, diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt index f26169fe..309ef68f 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt @@ -41,6 +41,9 @@ class OptionsFragment : BaseFragment() { val intent = Intent(Settings.ACTION_SETTINGS) launchActivity(it, intent) } + options_fragment_back.setOnClickListener{ + requireActivity().onBackPressed() + } options_fragment_device_settings.setOnLongClickListener { val intent = Intent(Settings.ACTION_HOME_SETTINGS) launchActivity(it, intent) diff --git a/app/src/main/res/drawable/ic_back.xml b/app/src/main/res/drawable/ic_back.xml new file mode 100644 index 00000000..7cc1b318 --- /dev/null +++ b/app/src/main/res/drawable/ic_back.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/customise_apps_fragment.xml b/app/src/main/res/layout/customise_apps_fragment.xml index 628dd245..c4d83c4e 100644 --- a/app/src/main/res/layout/customise_apps_fragment.xml +++ b/app/src/main/res/layout/customise_apps_fragment.xml @@ -5,14 +5,26 @@ android:id="@+id/customise_apps_fragment" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginTop="@dimen/_8sdp" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:layout_marginEnd="8dp" android:layout_marginRight="8dp" tools:context=".ui.options.CustomiseAppsFragment"> + + diff --git a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml index 2e1587c6..32431cba 100644 --- a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml +++ b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml @@ -11,12 +11,21 @@ android:layout_marginRight="8dp" tools:context=".ui.options.CustomizeAppDrawerFragment"> + + + + + + + + + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="@id/options_fragment_back" + app:layout_constraintStart_toEndOf="@id/options_fragment_back" + /> + + Date: Sat, 23 Dec 2023 18:35:38 +0100 Subject: [PATCH 03/10] Fix layout and add button to customize_drawer --- .../ui/options/CustomizeAppDrawerFragment.kt | 5 + app/src/main/res/layout/add_app_fragment.xml | 16 +- .../res/layout/customise_apps_fragment.xml | 9 +- .../customise_apps_fragment_list_item.xml | 2 - ...customize_app_drawer_app_list_fragment.xml | 11 +- .../layout/customize_app_drawer_fragment.xml | 8 +- ...p_drawer_fragment_search_field_options.xml | 28 ++- .../customize_quick_buttons_fragment.xml | 7 +- app/src/main/res/layout/options_fragment.xml | 230 +++++++++--------- 9 files changed, 162 insertions(+), 154 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt index 10f72e33..28dae2a2 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt @@ -12,6 +12,7 @@ import com.sduduzog.slimlauncher.utils.BaseFragment import com.sduduzog.slimlauncher.utils.createTitleAndSubtitleText import dagger.hilt.android.AndroidEntryPoint import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment +import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_back import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_search_options import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_show_headings_switch import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_visible_apps @@ -37,6 +38,10 @@ class CustomizeAppDrawerFragment : BaseFragment() { customize_app_drawer_fragment_visible_apps .setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_customiseAppDrawerFragment_to_customiseAppDrawerAppListFragment)) + customize_app_drawer_fragment_back.setOnClickListener{ + requireActivity().onBackPressed() + } + setupSearchFieldOptionsButton() setupHeadingSwitch() } diff --git a/app/src/main/res/layout/add_app_fragment.xml b/app/src/main/res/layout/add_app_fragment.xml index feee29e5..8528e8c9 100644 --- a/app/src/main/res/layout/add_app_fragment.xml +++ b/app/src/main/res/layout/add_app_fragment.xml @@ -5,17 +5,15 @@ android:id="@+id/add_app_fragment" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginTop="@dimen/_8sdp" + android:layout_marginStart="@dimen/_16sdp" + android:layout_marginEnd="@dimen/_16sdp" tools:context=".ui.options.AddAppFragment"> + app:layout_constraintTop_toBottomOf="@id/customize_app_drawer_title" /> + + + + + app:layout_constraintTop_toBottomOf="@id/customise_apps_fragment_title" /> diff --git a/app/src/main/res/layout/options_fragment.xml b/app/src/main/res/layout/options_fragment.xml index 2d326d62..d9b6380b 100644 --- a/app/src/main/res/layout/options_fragment.xml +++ b/app/src/main/res/layout/options_fragment.xml @@ -4,6 +4,9 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginStart="@dimen/_16sdp" + android:layout_marginEnd="@dimen/_16sdp" + android:layout_marginTop="@dimen/_8sdp" android:overScrollMode="ifContentScrolls" android:fillViewport="true" android:scrollbars="none"> @@ -12,7 +15,6 @@ android:id="@+id/options_fragment" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="@dimen/_8sdp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" tools:context=".ui.options.OptionsFragment"> @@ -22,6 +24,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" + android:paddingStart="0px" app:layout_constraintTop_toTopOf="@id/options_fragment_title" app:layout_constraintBottom_toBottomOf="@id/options_fragment_title" app:layout_constraintStart_toStartOf="parent" @@ -30,141 +33,134 @@ - - - + android:layout_height="match_parent" + android:layout_marginStart="@dimen/_8sdp" + android:layout_marginEnd="@dimen/_8sdp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toBottomOf="@+id/options_fragment_title"> - + - + - + - + - + - + - + - + + + + From a64cfc21f41ab20b488756269f05dfa69b11b23b Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Wed, 27 Dec 2023 15:31:34 -0600 Subject: [PATCH 04/10] Fix up customize_app_drawer_fragment_search_field_options.xml --- .../options/CustomizeSearchFieldFragment.kt | 5 + ...p_drawer_fragment_search_field_options.xml | 108 ++++++++++-------- app/src/main/res/values/strings.xml | 1 + 3 files changed, 64 insertions(+), 50 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeSearchFieldFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeSearchFieldFragment.kt index 4ed7bab1..96eafff5 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeSearchFieldFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeSearchFieldFragment.kt @@ -10,6 +10,7 @@ import com.sduduzog.slimlauncher.ui.dialogs.ChooseSearchBarPositionDialog import com.sduduzog.slimlauncher.utils.BaseFragment import com.sduduzog.slimlauncher.utils.createTitleAndSubtitleText import dagger.hilt.android.AndroidEntryPoint +import kotlinx.android.synthetic.main.customize_app_drawer_fragment_search_field_options.customise_apps_fragment_back import kotlinx.android.synthetic.main.customize_app_drawer_fragment_search_field_options.customize_app_drawer_fragment_search_field_options import kotlinx.android.synthetic.main.customize_app_drawer_fragment_search_field_options.customize_app_drawer_fragment_search_field_position @@ -40,6 +41,10 @@ class CustomizeSearchFieldFragment : BaseFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + customise_apps_fragment_back.setOnClickListener{ + requireActivity().onBackPressedDispatcher.onBackPressed() + } + setupShowSearchBarSwitch() setupSearchBarPositionOption() setupKeyboardSwitch() diff --git a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml index e8638f01..598ac23b 100644 --- a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml +++ b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml @@ -15,70 +15,78 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" - android:paddingStart="0px" - app:layout_constraintTop_toTopOf="@id/customise_apps_fragment_title" - app:layout_constraintBottom_toBottomOf="@id/customise_apps_fragment_title" + android:paddingStart="0dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_back" - tools:ignore="ContentDescription" /> - + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> - + android:layout_height="0dp" + android:layout_marginTop="@dimen/_16sdp" + android:overScrollMode="ifContentScrolls" + android:scrollbars="none" + app:layout_constraintTop_toBottomOf="@id/customise_apps_fragment_title"> - + - + + + + - + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 66c55ba7..ad3a7c4a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -41,6 +41,7 @@ time_format hide_status_bar alignment + Back Choose Time Format Options Device Settings From e1e65bf3e9629a2c0cfd469bc67a423979399c1f Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Wed, 27 Dec 2023 16:39:23 -0600 Subject: [PATCH 05/10] Fix up options_fragment.xml --- ...p_drawer_fragment_search_field_options.xml | 12 +- app/src/main/res/layout/options_fragment.xml | 157 ++++++++---------- app/src/main/res/values/dimens.xml | 2 + 3 files changed, 75 insertions(+), 96 deletions(-) diff --git a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml index 598ac23b..c0fc6f5d 100644 --- a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml +++ b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml @@ -35,14 +35,16 @@ + android:layout_height="wrap_content" + android:paddingBottom="@dimen/_100sdp"> - + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".ui.options.OptionsFragment"> - - - + app:layout_constraintStart_toStartOf="parent" + app:srcCompat="@drawable/ic_back" + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> + - + + android:layout_height="wrap_content" + android:paddingBottom="@dimen/_100sdp"> - + android:textSize="@dimen/font_size_customize_options" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - - - - - - + - - - - + + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 930ce12b..def05053 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -17,4 +17,6 @@ @dimen/_24ssp @dimen/_18ssp @dimen/_18ssp + + @dimen/_24sdp From a534bdd630f2678abae0faec257557fc34bce27f Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Wed, 27 Dec 2023 16:44:54 -0600 Subject: [PATCH 06/10] Fix up customise_apps_fragment.xml --- .../ui/options/CustomiseAppsFragment.kt | 2 +- .../slimlauncher/ui/options/OptionsFragment.kt | 2 +- app/src/main/res/layout/customise_apps_fragment.xml | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt index d411232f..d465e580 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt @@ -44,7 +44,7 @@ class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener, OnAppCli override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) customise_apps_fragment_back.setOnClickListener { - requireActivity().onBackPressed() + requireActivity().onBackPressedDispatcher.onBackPressed() } } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt index 309ef68f..082bd263 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt @@ -42,7 +42,7 @@ class OptionsFragment : BaseFragment() { launchActivity(it, intent) } options_fragment_back.setOnClickListener{ - requireActivity().onBackPressed() + requireActivity().onBackPressedDispatcher.onBackPressed() } options_fragment_device_settings.setOnLongClickListener { val intent = Intent(Settings.ACTION_HOME_SETTINGS) diff --git a/app/src/main/res/layout/customise_apps_fragment.xml b/app/src/main/res/layout/customise_apps_fragment.xml index 373b295a..9599a77e 100644 --- a/app/src/main/res/layout/customise_apps_fragment.xml +++ b/app/src/main/res/layout/customise_apps_fragment.xml @@ -15,13 +15,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" - android:paddingStart="0px" - app:layout_constraintTop_toTopOf="@id/customise_apps_fragment_title" - app:layout_constraintBottom_toBottomOf="@id/customise_apps_fragment_title" + android:paddingStart="0dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_back" - tools:ignore="ContentDescription" /> - + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> - - - + \ No newline at end of file From 15c9afb41a7fa772fefc3a9dff4ee2700922e711 Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Wed, 27 Dec 2023 16:55:13 -0600 Subject: [PATCH 07/10] Fix up customize_app_drawer_fragment.xml and customize_quick_buttons_fragment.xml --- .../ui/options/CustomizeAppDrawerFragment.kt | 2 +- .../options/CustomizeQuickButtonsFragment.kt | 2 +- .../layout/customize_app_drawer_fragment.xml | 89 +++++++++++-------- .../customize_quick_buttons_fragment.xml | 13 +-- 4 files changed, 56 insertions(+), 50 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt index 95d16373..16016382 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerFragment.kt @@ -39,7 +39,7 @@ class CustomizeAppDrawerFragment : BaseFragment() { .setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_customiseAppDrawerFragment_to_customiseAppDrawerAppListFragment)) customize_app_drawer_fragment_back.setOnClickListener{ - requireActivity().onBackPressed() + requireActivity().onBackPressedDispatcher.onBackPressed() } setupSearchFieldOptionsButton() diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt index e11d9846..e493e065 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeQuickButtonsFragment.kt @@ -44,7 +44,7 @@ class CustomizeQuickButtonsFragment : BaseFragment() { } customize_quick_buttons_fragment_back.setOnClickListener { - requireActivity().onBackPressed() + requireActivity().onBackPressedDispatcher.onBackPressed() } customize_quick_buttons_fragment_left.setOnClickListener { ChooseQuickButtonDialog( diff --git a/app/src/main/res/layout/customize_app_drawer_fragment.xml b/app/src/main/res/layout/customize_app_drawer_fragment.xml index 59057403..c767c400 100644 --- a/app/src/main/res/layout/customize_app_drawer_fragment.xml +++ b/app/src/main/res/layout/customize_app_drawer_fragment.xml @@ -15,57 +15,68 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" - android:paddingStart="0px" - app:layout_constraintTop_toTopOf="@id/customize_app_drawer_title" - app:layout_constraintBottom_toBottomOf="@id/customize_app_drawer_title" + android:paddingStart="0dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_back" - tools:ignore="ContentDescription" /> - + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> - + android:layout_height="0dp" + android:layout_marginTop="@dimen/margin_list_items" + android:layout_marginStart="@dimen/_8sdp" + android:overScrollMode="ifContentScrolls" + android:scrollbars="none" + app:layout_constraintTop_toBottomOf="@id/customize_app_drawer_title"> - + - + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/customize_quick_buttons_fragment.xml b/app/src/main/res/layout/customize_quick_buttons_fragment.xml index 5127619e..f9232f7b 100644 --- a/app/src/main/res/layout/customize_quick_buttons_fragment.xml +++ b/app/src/main/res/layout/customize_quick_buttons_fragment.xml @@ -15,13 +15,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" - android:paddingStart="0px" - app:layout_constraintTop_toTopOf="@id/customize_quick_buttons_fragment_header" - app:layout_constraintBottom_toBottomOf="@id/customize_quick_buttons_fragment_header" + android:paddingStart="0dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_back" - tools:ignore="ContentDescription" /> - + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> - - - Date: Wed, 27 Dec 2023 17:02:47 -0600 Subject: [PATCH 08/10] Fix up customize_app_drawer_app_list_fragment.xml --- .../ui/options/CustomiseAppsFragment.kt | 8 +++++--- .../ui/options/CustomizeAppDrawerAppListFragment.kt | 2 +- .../customize_app_drawer_app_list_fragment.xml | 13 +++++++------ ...ize_app_drawer_fragment_search_field_options.xml | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt index d465e580..b3f024ee 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt @@ -1,6 +1,5 @@ package com.sduduzog.slimlauncher.ui.options -import android.content.Context import android.graphics.Canvas import android.os.Bundle import android.view.LayoutInflater @@ -23,8 +22,11 @@ import com.sduduzog.slimlauncher.utils.OnAppClickedListener import com.sduduzog.slimlauncher.utils.OnItemActionListener import com.sduduzog.slimlauncher.utils.OnShitDoneToAppsListener import dagger.hilt.android.AndroidEntryPoint -import kotlinx.android.synthetic.main.customise_apps_fragment.* -import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_back +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_add +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_back +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_list +import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_remove_all @AndroidEntryPoint diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt index db2236a3..f10a664a 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt @@ -43,7 +43,7 @@ class CustomizeAppDrawerAppListFragment : BaseFragment() { } } customize_app_drawer_fragment_back.setOnClickListener { - requireActivity().onBackPressed() + requireActivity().onBackPressedDispatcher.onBackPressed() } } } \ No newline at end of file diff --git a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml index d77d0b24..75db7820 100644 --- a/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml +++ b/app/src/main/res/layout/customize_app_drawer_app_list_fragment.xml @@ -15,20 +15,20 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/_8ssp" - android:paddingStart="0px" - app:layout_constraintTop_toTopOf="@id/customize_app_drawer_fragment_app_list_title" - app:layout_constraintBottom_toBottomOf="@id/customize_app_drawer_fragment_app_list_title" + android:paddingStart="0dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_back" - tools:ignore="ContentDescription" /> - + android:contentDescription="@string/content_description_back" + tools:ignore="RtlSymmetry" /> @@ -36,6 +36,7 @@ android:id="@+id/customize_app_drawer_fragment_app_list" android:layout_width="0dp" android:layout_height="0dp" + android:layout_marginTop="@dimen/_16sdp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml index c0fc6f5d..7956f8af 100644 --- a/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml +++ b/app/src/main/res/layout/customize_app_drawer_fragment_search_field_options.xml @@ -35,7 +35,7 @@ Date: Wed, 27 Dec 2023 17:17:40 -0600 Subject: [PATCH 09/10] Fix up options page titles so they wrap as expected --- app/src/main/res/layout/customise_apps_fragment.xml | 3 ++- .../main/res/layout/customize_app_drawer_app_list_fragment.xml | 3 ++- app/src/main/res/layout/customize_app_drawer_fragment.xml | 3 ++- .../customize_app_drawer_fragment_search_field_options.xml | 3 ++- app/src/main/res/layout/customize_quick_buttons_fragment.xml | 3 ++- app/src/main/res/layout/options_fragment.xml | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/layout/customise_apps_fragment.xml b/app/src/main/res/layout/customise_apps_fragment.xml index 9599a77e..dd67e087 100644 --- a/app/src/main/res/layout/customise_apps_fragment.xml +++ b/app/src/main/res/layout/customise_apps_fragment.xml @@ -23,13 +23,14 @@ tools:ignore="RtlSymmetry" /> Date: Wed, 27 Dec 2023 17:25:59 -0600 Subject: [PATCH 10/10] Clean up imports --- .../slimlauncher/ui/options/CustomiseAppsFragment.kt | 7 +------ .../ui/options/CustomizeAppDrawerAppListFragment.kt | 8 ++++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt index b3f024ee..ec5ea47a 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomiseAppsFragment.kt @@ -12,13 +12,11 @@ import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView import com.sduduzog.slimlauncher.R import com.sduduzog.slimlauncher.adapters.CustomAppsAdapter -import com.sduduzog.slimlauncher.data.model.App import com.sduduzog.slimlauncher.models.CustomiseAppsViewModel import com.sduduzog.slimlauncher.models.HomeApp import com.sduduzog.slimlauncher.ui.dialogs.RemoveAllAppsDialog import com.sduduzog.slimlauncher.ui.dialogs.RenameAppDialog import com.sduduzog.slimlauncher.utils.BaseFragment -import com.sduduzog.slimlauncher.utils.OnAppClickedListener import com.sduduzog.slimlauncher.utils.OnItemActionListener import com.sduduzog.slimlauncher.utils.OnShitDoneToAppsListener import dagger.hilt.android.AndroidEntryPoint @@ -30,7 +28,7 @@ import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fra @AndroidEntryPoint -class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener, OnAppClickedListener { +class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener { override fun getFragmentView(): ViewGroup = customise_apps_fragment @@ -40,9 +38,6 @@ class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener, OnAppCli return inflater.inflate(R.layout.customise_apps_fragment, container, false) } - override fun onAppClicked(app: App) { - TODO("Not yet implemented") - } override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) customise_apps_fragment_back.setOnClickListener { diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt index f10a664a..a1a76e81 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/options/CustomizeAppDrawerAppListFragment.kt @@ -6,13 +6,13 @@ import android.view.View import android.view.ViewGroup import com.sduduzog.slimlauncher.R import com.sduduzog.slimlauncher.adapters.CustomizeAppDrawerAppsAdapter -import com.sduduzog.slimlauncher.data.model.App import com.sduduzog.slimlauncher.datasource.UnlauncherDataSource import com.sduduzog.slimlauncher.utils.BaseFragment import dagger.hilt.android.AndroidEntryPoint -import kotlinx.android.synthetic.main.customise_apps_fragment.customise_apps_fragment_back -import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.* -import kotlinx.android.synthetic.main.customize_app_drawer_fragment.customize_app_drawer_fragment_back +import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.customize_app_drawer_fragment +import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.customize_app_drawer_fragment_app_list +import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.customize_app_drawer_fragment_app_progress_bar +import kotlinx.android.synthetic.main.customize_app_drawer_app_list_fragment.customize_app_drawer_fragment_back import javax.inject.Inject @AndroidEntryPoint