summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@lineageos.org>2017-11-09 16:05:00 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-19 00:27:13 +0100
commit97105a6eb4de7a9ec0509b5c60c05ab0f4aef08c (patch)
treea06bb7480f538ffae254a6928902cf982aa11b39 /res
parentaca5a8bc95c1461419039a2041a8a54a84f49790 (diff)
downloadandroid_packages_apps_Trebuchet-97105a6eb4de7a9ec0509b5c60c05ab0f4aef08c.tar.gz
android_packages_apps_Trebuchet-97105a6eb4de7a9ec0509b5c60c05ab0f4aef08c.tar.bz2
android_packages_apps_Trebuchet-97105a6eb4de7a9ec0509b5c60c05ab0f4aef08c.zip
Launcher3: custom grid
Signed-off-by: Arne Coucheron <arco68@gmail.com> Signed-off-by: Joey Rizzoli <joey@lineageos.org>
Diffstat (limited to 'res')
-rw-r--r--res/layout/dialog_custom_grid.xml59
-rw-r--r--res/values/attrs.xml1
-rw-r--r--res/values/lineage_strings.xml9
-rw-r--r--res/xml/device_profiles.xml11
-rw-r--r--res/xml/launcher_preferences.xml5
5 files changed, 84 insertions, 1 deletions
diff --git a/res/layout/dialog_custom_grid.xml b/res/layout/dialog_custom_grid.xml
new file mode 100644
index 000000000..aa54b78f7
--- /dev/null
+++ b/res/layout/dialog_custom_grid.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:padding="16dp">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAlignment="center"
+ android:text="@string/grid_size_columns" />
+
+ <NumberPicker
+ android:id="@+id/dialog_grid_column"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAlignment="center"
+ android:text="@string/grid_size_rows" />
+
+ <NumberPicker
+ android:id="@+id/dialog_grid_row"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp" />
+ </LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 5aee715b6..9e6d4714e 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -109,6 +109,7 @@
<attr name="numRows" format="integer" />
<attr name="numColumns" format="integer" />
+ <attr name="numColumnsDrawer" format="integer" />
<!-- numFolderRows & numFolderColumns defaults to numRows & numColumns, if not specified -->
<attr name="numFolderRows" format="integer" />
<attr name="numFolderColumns" format="integer" />
diff --git a/res/values/lineage_strings.xml b/res/values/lineage_strings.xml
index fe574ebba..c96dc5af2 100644
--- a/res/values/lineage_strings.xml
+++ b/res/values/lineage_strings.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+<resources>
<!-- Application name -->
<string name="lineageos_app_name" translatable="false">Trebuchet</string>
@@ -29,4 +29,11 @@
<string name="predictive_apps_title">Predictive apps</string>
<string name="predictive_apps_summary_on">Your favorite apps will appear at the top of the drawer</string>
<string name="predictive_apps_summary_off">Your favorite apps won\'t appear at the top of the drawer</string>
+
+ <!-- Grid size -->
+ <string name="grid_size_text">Grid size</string>
+ <string name="grid_size_rows">Rows</string>
+ <string name="grid_size_columns">Columns</string>
+ <string name="grid_size_custom_positive">Set</string>
+ <string name="grid_size_custom_message">Select custom columns and rows count</string>
</resources>
diff --git a/res/xml/device_profiles.xml b/res/xml/device_profiles.xml
index d4de77ae8..c5cec46e1 100644
--- a/res/xml/device_profiles.xml
+++ b/res/xml/device_profiles.xml
@@ -23,6 +23,7 @@
launcher:minHeightDps="300"
launcher:numRows="2"
launcher:numColumns="3"
+ launcher:numColumnsDrawer="3"
launcher:numFolderRows="2"
launcher:numFolderColumns="3"
launcher:minAllAppsPredictionColumns="3"
@@ -38,6 +39,7 @@
launcher:minHeightDps="400"
launcher:numRows="3"
launcher:numColumns="3"
+ launcher:numColumnsDrawer="3"
launcher:numFolderRows="3"
launcher:numFolderColumns="3"
launcher:minAllAppsPredictionColumns="3"
@@ -53,6 +55,7 @@
launcher:minHeightDps="420"
launcher:numRows="3"
launcher:numColumns="4"
+ launcher:numColumnsDrawer="4"
launcher:numFolderRows="3"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -68,6 +71,7 @@
launcher:minHeightDps="450"
launcher:numRows="3"
launcher:numColumns="4"
+ launcher:numColumnsDrawer="4"
launcher:numFolderRows="3"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -83,6 +87,7 @@
launcher:minHeightDps="491.33"
launcher:numRows="5"
launcher:numColumns="4"
+ launcher:numColumnsDrawer="4"
launcher:numFolderRows="4"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -98,6 +103,7 @@
launcher:minHeightDps="567"
launcher:numRows="5"
launcher:numColumns="4"
+ launcher:numColumnsDrawer="4"
launcher:numFolderRows="4"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -113,6 +119,7 @@
launcher:minHeightDps="567"
launcher:numRows="5"
launcher:numColumns="4"
+ launcher:numColumnsDrawer="4"
launcher:numFolderRows="4"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -128,6 +135,7 @@
launcher:minHeightDps="694"
launcher:numRows="5"
launcher:numColumns="5"
+ launcher:numColumnsDrawer="5"
launcher:numFolderRows="4"
launcher:numFolderColumns="4"
launcher:minAllAppsPredictionColumns="4"
@@ -143,6 +151,7 @@
launcher:minHeightDps="904"
launcher:numRows="5"
launcher:numColumns="6"
+ launcher:numColumnsDrawer="5"
launcher:numFolderRows="4"
launcher:numFolderColumns="5"
launcher:minAllAppsPredictionColumns="4"
@@ -158,6 +167,7 @@
launcher:minHeightDps="1207"
launcher:numRows="5"
launcher:numColumns="6"
+ launcher:numColumnsDrawer="6"
launcher:numFolderRows="4"
launcher:numFolderColumns="5"
launcher:minAllAppsPredictionColumns="4"
@@ -173,6 +183,7 @@
launcher:minHeightDps="2527"
launcher:numRows="7"
launcher:numColumns="7"
+ launcher:numColumnsDrawer="7"
launcher:numFolderRows="6"
launcher:numFolderColumns="6"
launcher:minAllAppsPredictionColumns="4"
diff --git a/res/xml/launcher_preferences.xml b/res/xml/launcher_preferences.xml
index 7077758b2..2281ab5ad 100644
--- a/res/xml/launcher_preferences.xml
+++ b/res/xml/launcher_preferences.xml
@@ -66,4 +66,9 @@
android:summaryOff="@string/predictive_apps_summary_off"
android:defaultValue="true"
android:persistent="true" />
+
+ <Preference
+ android:key="pref_grid_size"
+ android:title="@string/grid_size_text"
+ android:persistent="true" />
</PreferenceScreen>