Merge branch 'feature/app-list-layout'

This commit is contained in:
Josia Pietsch 2024-11-27 16:15:21 +01:00
commit 172de1f3dd
Signed by: jrpie
GPG key ID: E70B571D66986A2D
9 changed files with 161 additions and 17 deletions

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list_apps_row_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5sp">
<ImageView
android:id="@+id/list_apps_row_icon"
android:layout_width="40sp"
android:layout_height="40sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/list_apps_row_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="5dp"
android:text=""
android:textSize="11sp"
tools:text="some app"
app:layout_constraintTop_toBottomOf="@id/list_apps_row_icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list_apps_row_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5sp">
<ImageView
android:id="@+id/list_apps_row_icon"
android:layout_width="0sp"
android:layout_height="0sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:visibility="gone"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/list_apps_row_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="start|center_horizontal"
android:padding="5dp"
android:paddingStart="20dp"
android:text=""
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="some app" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -9,12 +9,25 @@
<string name="settings_internal_started_key" translatable="false">internal.started_before</string>
<string name="settings_internal_started_time_key" translatable="false">internal.first_startup</string>
<string name="settings_internal_version_code_key" translatable="false">internal.version_code</string>
<string name="settings_apps_favorites_key" translatable="false">apps.favorites</string>
<string name="settings_apps_hidden_key" translatable="false">apps.hidden</string>
<string name="settings_apps_custom_names_key" translatable="false">apps.custom_names</string>
<string name="settings_apps_hide_bound_apps_key" translatable="false">apps.hide_bound_apps</string>
<string name="settings_apps_favorites_key" translatable="false">apps.favorites</string>
<string name="settings_apps_hidden_key" translatable="false">apps.hidden</string>
<string name="settings_apps_custom_names_key" translatable="false">apps.custom_names</string>
<string name="settings_apps_hide_bound_apps_key" translatable="false">apps.hide_bound_apps</string>
<string name="settings_list_layout_key" translatable="false">list.layout</string>
<string name="settings_general_choose_home_screen_key" translatable="false">general.select_launcher</string>
<string name="settings_general_choose_home_screen_key" translatable="false">general.select_launcher</string>
<!-- values of de.jrpie.android.launcher.preferences.ListLayout -->
<string-array name="settings_list_layout_values" translatable="false">
<item>DEFAULT</item>
<item>TEXT</item>
<item>GRID</item>
</string-array>
<string-array name="settings_list_layout_items" translatable="false">
<item>@string/settings_list_layout_item_default</item>
<item>@string/settings_list_layout_item_text</item>
<item>@string/settings_list_layout_item_grid</item>
</string-array>
<!--
-
- Settings : Gestures

View file

@ -145,6 +145,11 @@
<string name="settings_launcher_section_apps">Apps</string>
<string name="settings_apps_hidden">Hidden apps</string>
<string name="settings_apps_hide_bound_apps">Don\'t show apps that are bound to a gesture in the app list</string>
<string name="settings_list_layout">Layout of app list</string>
<string name="settings_list_layout_item_default">Default</string>
<string name="settings_list_layout_item_text">Text</string>
<string name="settings_list_layout_item_grid">Grid</string>
<!--
-

View file

@ -135,6 +135,14 @@
android:title="@string/settings_apps_hide_bound_apps"
android:defaultValue="false" />
<DropDownPreference
android:key="@string/settings_list_layout_key"
android:title="@string/settings_list_layout"
android:entries="@array/settings_list_layout_items"
android:entryValues="@array/settings_list_layout_values"
android:summary="%s"
android:defaultValue="DEFAULT"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/settings_launcher_section_display"