| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright 2016 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. --> |
| |
| <!-- Represents a single item in the DownloadHistoryAdapterView. --> |
| <view class="org.chromium.chrome.browser.download.ui.DownloadItemView" |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" > |
| |
| <!-- The end margin is not assigned because the cancel button overlaps it. --> |
| <LinearLayout |
| android:id="@+id/layout_container" |
| style="@style/ListItemContainer" > |
| |
| <org.chromium.ui.widget.ChromeImageView |
| android:id="@+id/icon_view" |
| style="@style/DownloadIconView" |
| app:tint="@color/standard_mode_tint" /> |
| |
| <!-- Shown for completed downloads. --> |
| <RelativeLayout |
| android:id="@+id/completed_layout" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_weight="1"> |
| |
| <TextView |
| android:id="@+id/filename_completed_view" |
| style="@style/DownloadTitleStyle" |
| android:layout_alignParentEnd="true" /> |
| |
| <TextView |
| android:id="@+id/description_view" |
| style="@style/DownloadDescriptionStyle" |
| android:layout_below="@+id/filename_completed_view" /> |
| </RelativeLayout> |
| |
| <include layout="@layout/list_menu_button" /> |
| |
| <!-- Shown for downloads that haven't been completed. --> |
| <RelativeLayout |
| android:id="@+id/progress_layout" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" > |
| |
| <TextView |
| android:id="@+id/filename_progress_view" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_marginEnd="16dp" |
| android:layout_alignParentTop="true" |
| android:layout_alignParentStart="true" |
| android:layout_toStartOf="@+id/pause_button" |
| android:minHeight="18dp" |
| android:singleLine="true" |
| android:textAppearance="@style/TextAppearance.BlackTitle1" /> |
| |
| <org.chromium.chrome.browser.widget.MaterialProgressBar |
| android:id="@+id/download_progress_view" |
| android:layout_width="wrap_content" |
| android:layout_height="2dp" |
| android:layout_marginTop="5dp" |
| android:layout_marginBottom="5dp" |
| android:layout_marginEnd="16dp" |
| android:layout_below="@+id/filename_progress_view" |
| android:layout_alignParentStart="true" |
| android:layout_toStartOf="@+id/pause_button" |
| app:colorBackground="@color/downloads_progress_bar_background_blue" |
| app:colorProgress="@color/light_active_color" |
| app:colorSecondaryProgress="@color/modern_grey_600" /> |
| |
| <TextView |
| android:id="@+id/status_view" |
| style="@style/DownloadHomeStatusText" |
| android:layout_marginEnd="16dp" |
| android:layout_alignParentBottom="true" |
| android:layout_alignParentStart="true" |
| android:layout_toStartOf="@+id/percentage_view" |
| android:layout_below="@+id/download_progress_view" |
| android:textAlignment="viewStart" /> |
| |
| <TextView |
| android:id="@+id/percentage_view" |
| style="@style/DownloadHomeStatusText" |
| android:layout_alignParentBottom="true" |
| android:layout_toStartOf="@+id/pause_button" |
| android:layout_below="@+id/download_progress_view" |
| android:textAlignment="viewEnd" /> |
| |
| <org.chromium.ui.widget.ChromeImageButton |
| android:id="@+id/pause_button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" |
| android:layout_alignParentTop="true" |
| android:layout_alignParentBottom="true" |
| android:layout_toStartOf="@+id/cancel_button" |
| android:padding="8dp" |
| android:background="?attr/selectableItemBackground" |
| android:contentDescription="@string/download_notification_pause_button" |
| android:src="@drawable/ic_pause_white_24dp" |
| app:tint="@color/default_icon_color" /> |
| |
| <org.chromium.ui.widget.ChromeImageButton |
| android:id="@+id/cancel_button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" |
| android:layout_alignParentTop="true" |
| android:layout_alignParentBottom="true" |
| android:layout_alignParentEnd="true" |
| android:padding="8dp" |
| android:paddingEnd="@dimen/selectable_list_layout_row_padding" |
| android:background="?attr/selectableItemBackground" |
| android:contentDescription="@string/download_notification_cancel_button" |
| android:src="@drawable/btn_close" |
| app:tint="@color/default_icon_color" /> |
| </RelativeLayout> |
| </LinearLayout> |
| </view> |