| <?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. |
| --> |
| |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:background="?android:attr/selectableItemBackground" |
| android:focusable="true" |
| android:orientation="horizontal" > |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:baselineAligned="false" |
| android:gravity="center_vertical" |
| android:minHeight="@dimen/list_item_height" |
| android:orientation="horizontal" > |
| |
| <FrameLayout |
| android:id="@android:id/icon" |
| android:pointerIcon="hand" |
| android:layout_width="@dimen/list_item_width" |
| android:layout_height="@dimen/list_item_height" |
| android:paddingBottom="@dimen/list_item_icon_padding" |
| android:paddingTop="@dimen/list_item_icon_padding" |
| android:paddingEnd="16dp" |
| android:paddingStart="@dimen/list_item_padding" > |
| |
| <ImageView |
| android:id="@+id/icon_mime" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center" |
| android:contentDescription="@null" |
| android:scaleType="centerInside" /> |
| |
| <ImageView |
| android:id="@+id/icon_thumb" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:layout_gravity="center" |
| android:contentDescription="@null" |
| android:scaleType="centerCrop" /> |
| |
| <ImageView |
| android:id="@+id/icon_check" |
| android:layout_width="@dimen/check_icon_size" |
| android:layout_height="@dimen/check_icon_size" |
| android:layout_gravity="center" |
| android:alpha="0" |
| android:contentDescription="@null" |
| android:scaleType="fitCenter" |
| android:src="@drawable/ic_check_circle" /> |
| |
| </FrameLayout> |
| |
| <!-- This is the one special case where we want baseline alignment! --> |
| |
| <LinearLayout |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| android:orientation="horizontal" > |
| |
| <LinearLayout |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_weight="0.4" |
| android:layout_marginEnd="12dp" |
| android:orientation="horizontal"> |
| |
| <ImageView |
| android:id="@+id/icon_briefcase" |
| android:layout_height="@dimen/briefcase_icon_size" |
| android:layout_width="@dimen/briefcase_icon_size" |
| android:layout_marginEnd="@dimen/briefcase_icon_margin" |
| android:layout_gravity="center_vertical" |
| android:src="@drawable/ic_briefcase" |
| android:contentDescription="@null"/> |
| |
| <TextView |
| android:id="@android:id/title" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:ellipsize="middle" |
| android:singleLine="true" |
| android:textAlignment="viewStart" |
| android:textAppearance="@android:style/TextAppearance.Material.Subhead" |
| android:textColor="?android:attr/textColorPrimary"/> |
| </LinearLayout> |
| |
| <TextView |
| android:id="@+id/file_type" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginEnd="12dp" |
| android:layout_weight="0.2" |
| android:ellipsize="end" |
| android:singleLine="true" |
| android:textAlignment="viewStart" |
| android:textAppearance="@android:style/TextAppearance.Material.Body1" |
| android:textColor="?android:attr/textColorSecondary" /> |
| |
| <TextView |
| android:id="@+id/size" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginEnd="12dp" |
| android:layout_weight="0.2" |
| android:ellipsize="end" |
| android:minWidth="70dp" |
| android:singleLine="true" |
| android:textAlignment="viewEnd" |
| android:textAppearance="@android:style/TextAppearance.Material.Body1" |
| android:textColor="?android:attr/textColorSecondary" /> |
| |
| <TextView |
| android:id="@+id/date" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginEnd="12dp" |
| android:layout_weight="0.2" |
| android:ellipsize="end" |
| android:minWidth="70dp" |
| android:singleLine="true" |
| android:textAlignment="viewEnd" |
| android:textAppearance="@android:style/TextAppearance.Material.Body1" |
| android:textColor="?android:attr/textColorSecondary" /> |
| </LinearLayout> |
| |
| <FrameLayout |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| |
| <FrameLayout |
| android:id="@+id/preview_icon" |
| android:layout_width="@dimen/list_item_width" |
| android:layout_height="@dimen/list_item_height" |
| android:padding="@dimen/list_item_icon_padding" |
| android:focusable="true"> |
| |
| <ImageView |
| android:layout_width="@dimen/check_icon_size" |
| android:layout_height="@dimen/check_icon_size" |
| android:layout_gravity="center" |
| android:scaleType="fitCenter" |
| android:tint="?android:attr/textColorPrimary" |
| android:src="@drawable/ic_zoom_out"/> |
| |
| </FrameLayout> |
| |
| <android.widget.Space |
| android:layout_width="@dimen/list_item_width" |
| android:layout_height="@dimen/list_item_height"/> |
| |
| </FrameLayout> |
| |
| </LinearLayout> |
| |
| </LinearLayout> |