summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@lineageos.org>2017-11-12 12:40:39 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-19 00:27:13 +0100
commitc6b85822544de5194cff97d7fe07236f5c7a5b32 (patch)
tree41e82255f6b126ee57a5f8c272e4aa6ac6d7740a /res/layout
parent6a4b5ff6292360a34f6a6b33cb51f83d5ce82661 (diff)
downloadandroid_packages_apps_Trebuchet-c6b85822544de5194cff97d7fe07236f5c7a5b32.tar.gz
android_packages_apps_Trebuchet-c6b85822544de5194cff97d7fe07236f5c7a5b32.tar.bz2
android_packages_apps_Trebuchet-c6b85822544de5194cff97d7fe07236f5c7a5b32.zip
Trebuchet: icon packs support
Based on the following commits: * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/cf4bde2098de8beec24a0c88bf2e51e19a9c22b6 * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/8ddafe17ad6adc268ad1a93b7724d8b22028a71b * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/0940176c3c01a1f87237811f42d05a592b0968b3 With the following additions: * Support for adaptive icons * UI changes * Cleanup and improvements Change-Id: I877a8b2dd204753179736fa7c1c34444e9b2c849 Signed-off-by: Joey Rizzoli <joey@lineageos.org>
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/all_icons_view.xml63
-rw-r--r--res/layout/all_icons_view_header.xml25
-rw-r--r--res/layout/target_edit_dialog.xml48
-rw-r--r--res/layout/target_edit_dialog_item.xml28
-rw-r--r--res/layout/target_edit_iconpack_chooser.xml52
5 files changed, 216 insertions, 0 deletions
diff --git a/res/layout/all_icons_view.xml b/res/layout/all_icons_view.xml
new file mode 100644
index 000000000..f6707bc95
--- /dev/null
+++ b/res/layout/all_icons_view.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 The LineageOS Project
+ Copyright (C) 2017 Paranoid Android
+
+ 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:id="@+id/icons_grid_name_header"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:background="@color/icon_picker_header_background"
+ android:elevation="6dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingEnd="16dp"
+ android:paddingStart="16dp">
+
+ <ImageView
+ android:id="@+id/icons_grid_name_header_icon"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:layout_marginEnd="16dp" />
+
+ <TextView
+ android:id="@+id/icons_grid_name_header_title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:maxLines="1"
+ android:textAppearance="@android:style/TextAppearance.Material.Title"
+ android:textColor="@color/icon_picker_header_foreground" />
+ </LinearLayout>
+
+ <ProgressBar
+ android:id="@+id/icons_grid_progress"
+ style="?android:attr/progressBarStyle"
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_centerInParent="true" />
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/icons_grid"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/icons_grid_name_header"
+ android:layout_centerHorizontal="true" />
+</RelativeLayout>
diff --git a/res/layout/all_icons_view_header.xml b/res/layout/all_icons_view_header.xml
new file mode 100644
index 000000000..ba15ff2dd
--- /dev/null
+++ b/res/layout/all_icons_view_header.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 The LineageOS Projecy
+ Copyright (C) 2017 Paranoid Android
+
+ 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.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:paddingStart="24dp"
+ android:paddingBottom="8dp"
+ android:paddingTop="16dp"
+ android:textAppearance="@android:style/TextAppearance.Material.Body2" />
diff --git a/res/layout/target_edit_dialog.xml b/res/layout/target_edit_dialog.xml
new file mode 100644
index 000000000..da66a9c2c
--- /dev/null
+++ b/res/layout/target_edit_dialog.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 The LineageOS Project
+ Copyright (C) 2017 Paranoid Android
+
+ 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"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="16dp">
+
+ <ImageView
+ android:id="@+id/edit_dialog_icon"
+ android:layout_width="@dimen/app_icon_size"
+ android:layout_height="@dimen/app_icon_size"
+ android:layout_gravity="bottom"
+ android:layout_marginEnd="16dp"
+ android:background="?android:selectableItemBackground"
+ android:foreground="@drawable/ic_icon_change"
+ android:scaleType="fitCenter"
+ tools:src="@mipmap/ic_launcher_home" />
+
+ <EditText
+ android:id="@+id/edit_dialog_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|start"
+ android:ellipsize="end"
+ android:labelFor="@id/edit_dialog_icon"
+ android:maxLines="1"
+ android:textAlignment="viewStart"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:textColorPrimary"
+ android:textColorHint="?android:textColorSecondary"
+ tools:text="Trebuchet" />
+</LinearLayout>
diff --git a/res/layout/target_edit_dialog_item.xml b/res/layout/target_edit_dialog_item.xml
new file mode 100644
index 000000000..70492b565
--- /dev/null
+++ b/res/layout/target_edit_dialog_item.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 The LineageOS Project
+ Copyright (C) 2017 Paranoid Android
+
+ 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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:ellipsize="end"
+ android:gravity="center_vertical"
+ android:maxLines="1"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:textColor="?android:attr/textColorAlertDialogListItem"
+ android:textSize="14sp" />
diff --git a/res/layout/target_edit_iconpack_chooser.xml b/res/layout/target_edit_iconpack_chooser.xml
new file mode 100644
index 000000000..a7c9fad3d
--- /dev/null
+++ b/res/layout/target_edit_iconpack_chooser.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 The LineageOS Project
+ Copyright (C) 2017 Paranoid Android
+
+ 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"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingBottom="8dp"
+ android:paddingEnd="16dp"
+ android:paddingStart="16dp"
+ android:paddingTop="8dp">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size" />
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingEnd="8dp"
+ android:paddingStart="8dp"
+ android:textAppearance="?android:attr/textAppearanceListItemSmall"
+ android:textColor="?android:attr/textColorAlertDialogListItem"
+ android:textSize="18sp" />
+
+ <RadioButton
+ android:id="@+id/radio"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="false"
+ android:duplicateParentState="true"
+ android:focusable="false" />
+</LinearLayout>