Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2013 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
Steve McKay | d080506 | 2016-09-15 14:30:38 -0700 | [diff] [blame] | 17 | <com.android.documentsui.sidebar.RootItemView |
Garfield, Tan | 57facaf7 | 2016-05-27 15:02:35 -0700 | [diff] [blame] | 18 | xmlns:android="http://schemas.android.com/apk/res/android" |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 19 | android:layout_width="match_parent" |
| 20 | android:layout_height="wrap_content" |
Jeff Sharkey | e6fcceb | 2014-07-28 16:38:52 -0700 | [diff] [blame] | 21 | android:minHeight="48dp" |
Jon Mann | dea5491 | 2017-02-16 15:11:57 -0800 | [diff] [blame^] | 22 | android:paddingStart="25dp" |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 23 | android:gravity="center_vertical" |
Jeff Sharkey | 42d2679 | 2013-09-06 13:22:09 -0700 | [diff] [blame] | 24 | android:orientation="horizontal" |
Garfield, Tan | 57facaf7 | 2016-05-27 15:02:35 -0700 | [diff] [blame] | 25 | android:baselineAligned="false" |
| 26 | android:background="@drawable/root_item_background"> |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 27 | |
Jeff Sharkey | e6fcceb | 2014-07-28 16:38:52 -0700 | [diff] [blame] | 28 | <FrameLayout |
Jeff Sharkey | 42d2679 | 2013-09-06 13:22:09 -0700 | [diff] [blame] | 29 | android:layout_width="@dimen/icon_size" |
| 30 | android:layout_height="@dimen/icon_size" |
Jeff Sharkey | 7e54461 | 2014-08-29 15:38:27 -0700 | [diff] [blame] | 31 | android:duplicateParentState="true"> |
Jeff Sharkey | e6fcceb | 2014-07-28 16:38:52 -0700 | [diff] [blame] | 32 | |
| 33 | <ImageView |
| 34 | android:id="@android:id/icon" |
| 35 | android:layout_width="@dimen/root_icon_size" |
| 36 | android:layout_height="match_parent" |
| 37 | android:scaleType="centerInside" |
Jeff Sharkey | 7e54461 | 2014-08-29 15:38:27 -0700 | [diff] [blame] | 38 | android:contentDescription="@null" |
| 39 | android:duplicateParentState="true" /> |
Jeff Sharkey | e6fcceb | 2014-07-28 16:38:52 -0700 | [diff] [blame] | 40 | |
| 41 | </FrameLayout> |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 42 | |
| 43 | <LinearLayout |
| 44 | android:layout_width="match_parent" |
| 45 | android:layout_height="wrap_content" |
Jon Mann | dea5491 | 2017-02-16 15:11:57 -0800 | [diff] [blame^] | 46 | android:paddingStart="16dp" |
Jeff Sharkey | e6fcceb | 2014-07-28 16:38:52 -0700 | [diff] [blame] | 47 | android:paddingTop="8dp" |
| 48 | android:paddingBottom="8dp" |
Ben Lin | 5668b86 | 2016-06-28 17:12:52 -0700 | [diff] [blame] | 49 | android:orientation="vertical" |
| 50 | android:layout_weight="1"> |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 51 | |
| 52 | <TextView |
| 53 | android:id="@android:id/title" |
| 54 | android:layout_width="match_parent" |
| 55 | android:layout_height="wrap_content" |
| 56 | android:singleLine="true" |
Jeff Sharkey | 6a9bf98 | 2013-10-07 11:39:07 -0700 | [diff] [blame] | 57 | android:ellipsize="end" |
Jeff Sharkey | 5e1884d | 2013-09-10 17:56:39 -0700 | [diff] [blame] | 58 | android:textAlignment="viewStart" |
Jon Mann | dea5491 | 2017-02-16 15:11:57 -0800 | [diff] [blame^] | 59 | android:fontFamily="sans-serif-medium" |
| 60 | android:textSize="14sp" |
Jeff Sharkey | 7e54461 | 2014-08-29 15:38:27 -0700 | [diff] [blame] | 61 | android:textColor="@color/item_root_primary_text" /> |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 62 | |
| 63 | <TextView |
| 64 | android:id="@android:id/summary" |
| 65 | android:layout_width="match_parent" |
| 66 | android:layout_height="wrap_content" |
| 67 | android:singleLine="true" |
Jeff Sharkey | 6a9bf98 | 2013-10-07 11:39:07 -0700 | [diff] [blame] | 68 | android:ellipsize="end" |
Jeff Sharkey | 5e1884d | 2013-09-10 17:56:39 -0700 | [diff] [blame] | 69 | android:textAlignment="viewStart" |
Jon Mann | dea5491 | 2017-02-16 15:11:57 -0800 | [diff] [blame^] | 70 | android:fontFamily="sans-serif-medium" |
| 71 | android:textSize="13sp" |
| 72 | android:textColor="@color/root_details_color" /> |
Jeff Sharkey | 46165b5 | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 73 | |
| 74 | </LinearLayout> |
| 75 | |
Jon Mann | dea5491 | 2017-02-16 15:11:57 -0800 | [diff] [blame^] | 76 | <FrameLayout |
Ben Lin | 5668b86 | 2016-06-28 17:12:52 -0700 | [diff] [blame] | 77 | android:layout_width="@dimen/icon_size" |
| 78 | android:layout_height="@dimen/icon_size" |
| 79 | android:duplicateParentState="true"> |
| 80 | |
| 81 | <ImageView |
Ben Lin | 821727a | 2016-07-08 10:49:53 -0700 | [diff] [blame] | 82 | android:id="@+id/eject_icon" |
Ben Lin | 5668b86 | 2016-06-28 17:12:52 -0700 | [diff] [blame] | 83 | android:layout_width="@dimen/root_icon_size" |
| 84 | android:layout_height="match_parent" |
| 85 | android:scaleType="centerInside" |
| 86 | android:contentDescription="@string/menu_eject_root" |
| 87 | android:visibility="gone" /> |
| 88 | |
| 89 | </FrameLayout> |
| 90 | |
Steve McKay | d080506 | 2016-09-15 14:30:38 -0700 | [diff] [blame] | 91 | </com.android.documentsui.sidebar.RootItemView> |