diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-08-06 11:26:10 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-08-06 11:38:46 -0700 |
commit | 66516697a29cf00d93893a1011d3befc7c1ee37f (patch) | |
tree | c86d01f2f1aaf23edd5b4424388144670dad7cb2 /packages/DocumentsUI/res | |
parent | ef7184a1aa0be5d496a5cb495a0f9e11f342af44 (diff) | |
download | frameworks_base-66516697a29cf00d93893a1011d3befc7c1ee37f.zip frameworks_base-66516697a29cf00d93893a1011d3befc7c1ee37f.tar.gz frameworks_base-66516697a29cf00d93893a1011d3befc7c1ee37f.tar.bz2 |
Storage roots in fragment, sectioned.
Move storage roots into a fragment, since it's not a drawer on
tablets. Cluster and sort roots when displaying. SectionedListAdapter
to make clustered roots easier to manage. Add docs for root types.
Move roots cache into separate class to make it easier to share.
Change-Id: Ia0b92eade059e816324641f600c08026c0e268c9
Diffstat (limited to 'packages/DocumentsUI/res')
-rw-r--r-- | packages/DocumentsUI/res/layout/activity.xml | 8 | ||||
-rw-r--r-- | packages/DocumentsUI/res/layout/fragment_roots.xml | 20 | ||||
-rw-r--r-- | packages/DocumentsUI/res/layout/item_root_header.xml | 29 | ||||
-rw-r--r-- | packages/DocumentsUI/res/values/strings.xml | 4 |
4 files changed, 57 insertions, 4 deletions
diff --git a/packages/DocumentsUI/res/layout/activity.xml b/packages/DocumentsUI/res/layout/activity.xml index d4a01d3..ff28e41 100644 --- a/packages/DocumentsUI/res/layout/activity.xml +++ b/packages/DocumentsUI/res/layout/activity.xml @@ -25,20 +25,20 @@ android:orientation="vertical"> <FrameLayout - android:id="@+id/directory" + android:id="@+id/container_directory" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" /> <FrameLayout - android:id="@+id/save" + android:id="@+id/container_save" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> - <ListView - android:id="@+id/roots_list" + <FrameLayout + android:id="@+id/container_roots" android:layout_width="250dp" android:layout_height="match_parent" android:layout_gravity="start" diff --git a/packages/DocumentsUI/res/layout/fragment_roots.xml b/packages/DocumentsUI/res/layout/fragment_roots.xml new file mode 100644 index 0000000..d772892 --- /dev/null +++ b/packages/DocumentsUI/res/layout/fragment_roots.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. + 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. +--> + +<ListView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" /> diff --git a/packages/DocumentsUI/res/layout/item_root_header.xml b/packages/DocumentsUI/res/layout/item_root_header.xml new file mode 100644 index 0000000..2b9a46f --- /dev/null +++ b/packages/DocumentsUI/res/layout/item_root_header.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. + 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:id="@android:id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:singleLine="true" + android:ellipsize="marquee" + android:textAllCaps="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> diff --git a/packages/DocumentsUI/res/values/strings.xml b/packages/DocumentsUI/res/values/strings.xml index 3eda207..2ff5d03 100644 --- a/packages/DocumentsUI/res/values/strings.xml +++ b/packages/DocumentsUI/res/values/strings.xml @@ -41,4 +41,8 @@ <string name="root_recent">Recent</string> + <string name="root_type_service">Services</string> + <string name="root_type_shortcut">Shortcuts</string> + <string name="root_type_device">Devices</string> + </resources> |