summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-02-26 17:43:50 -0800
committerSunny Goyal <sunnygoyal@google.com>2015-03-04 15:55:47 -0800
commitc3a609f950a713d995f1968574d8ed7b4449f415 (patch)
treec83ece3c193a95e623997aa13ee913181b26029d /res
parent8dbf0fff1f424df8db1bbedfe8e5cfd7783a92ea (diff)
downloadandroid_packages_apps_Trebuchet-c3a609f950a713d995f1968574d8ed7b4449f415.tar.gz
android_packages_apps_Trebuchet-c3a609f950a713d995f1968574d8ed7b4449f415.tar.bz2
android_packages_apps_Trebuchet-c3a609f950a713d995f1968574d8ed7b4449f415.zip
Refactoring folder content
> Refactoring the CellLayout in folder with a custom view so that it can be replaced easily with a scrollable paged view. > Moving some methods from the folder to this new view which assume a single page layout for the folder > Changing folder from LinearLayout to FrameLayout to properly handle focus traversal in case of multi-page folders Change-Id: I073c00b995488f9f5d8123b00357e094ca2cec7c
Diffstat (limited to 'res')
-rw-r--r--res/layout/user_folder.xml57
1 files changed, 33 insertions, 24 deletions
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index ed8d43e46..74cdf11dc 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!--
+ Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,42 +15,50 @@
limitations under the License.
-->
-<com.android.launcher3.Folder
- xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.launcher3.Folder xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@drawable/quantum_panel">
+ android:background="@drawable/quantum_panel"
+ android:orientation="vertical" >
- <ScrollView
- android:id="@+id/scroll_view"
+ <FrameLayout
+ android:id="@+id/folder_content_wrapper"
android:layout_width="match_parent"
- android:layout_height="match_parent">
- <com.android.launcher3.CellLayout
- android:id="@+id/folder_content"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:cacheColorHint="#ff333333"
- android:hapticFeedbackEnabled="false" />
- </ScrollView>
+ android:layout_height="match_parent" >
+
+ <!-- Actual size of the indicator doesn't matter as it is scaled to match the view size -->
+
+ <com.android.launcher3.FocusIndicatorView
+ android:id="@+id/focus_indicator"
+ android:layout_width="20dp"
+ android:layout_height="20dp" />
+
+ <com.android.launcher3.FolderCellLayout
+ android:id="@+id/folder_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:cacheColorHint="#ff333333"
+ android:hapticFeedbackEnabled="false" />
+ </FrameLayout>
<com.android.launcher3.FolderEditText
android:id="@+id/folder_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
- android:paddingTop="@dimen/folder_name_padding"
- android:paddingBottom="@dimen/folder_name_padding"
android:background="#00000000"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center_horizontal"
android:hint="@string/folder_hint_text"
- android:textSize="14sp"
+ android:imeOptions="flagNoExtractUi"
+ android:paddingBottom="@dimen/folder_name_padding"
+ android:paddingTop="@dimen/folder_name_padding"
+ android:singleLine="true"
android:textColor="#ff777777"
- android:textColorHint="#ff808080"
android:textColorHighlight="#ffCCCCCC"
+ android:textColorHint="#ff808080"
android:textCursorDrawable="@null"
- android:gravity="center_horizontal"
- android:singleLine="true"
- android:imeOptions="flagNoExtractUi"
- android:fontFamily="sans-serif-condensed"/>
-</com.android.launcher3.Folder>
+ android:textSize="14sp" />
+
+</com.android.launcher3.Folder> \ No newline at end of file