| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Copyright 2018, 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. |
| --> |
| <!-- The whole item is clickable to be consistent with media_browse_grid_icons_item. --> |
| <androidx.constraintlayout.widget.ConstraintLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:id="@+id/media_item_click_target" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:clickable="true" |
| android:focusable="true" |
| android:foreground="?android:attr/selectableItemBackground" |
| android:layout_margin="@dimen/grid_item_spacing" |
| android:padding="@dimen/media_browse_grid_item_padding" |
| android:layout_marginBottom="@dimen/media_browse_grid_item_margin_bottom"> |
| |
| <FrameLayout |
| android:id="@+id/item_container" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toTopOf="parent"> |
| |
| <com.android.car.media.common.FixedRatioImageView |
| android:id="@+id/thumbnail" |
| android:layout_width="match_parent" |
| android:layout_height="0dp" |
| android:scaleType="centerCrop" |
| style="@style/MediaIconContainerStyle" |
| app:aspect_ratio="1"/> |
| |
| </FrameLayout> |
| |
| <ImageView |
| android:id="@+id/download_icon_with_title" |
| android:layout_width="@dimen/media_browse_indicator_size" |
| android:layout_height="@dimen/media_browse_indicator_size" |
| android:src="@drawable/ic_file_download_done_black" |
| android:tint="@color/icon_tint" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toStartOf="@+id/explicit_icon_with_title" |
| app:layout_constraintBottom_toBottomOf="@+id/title" |
| app:layout_constraintTop_toTopOf="@+id/title"/> |
| |
| <ImageView |
| android:id="@+id/explicit_icon_with_title" |
| android:layout_width="@dimen/media_browse_indicator_size" |
| android:layout_height="@dimen/media_browse_indicator_size" |
| android:src="@drawable/ic_explicit_black" |
| android:tint="@color/icon_tint" |
| app:layout_constraintBottom_toBottomOf="@+id/title" |
| app:layout_constraintTop_toTopOf="@+id/title" |
| app:layout_constraintStart_toEndOf="@+id/download_icon_with_title" |
| app:layout_constraintEnd_toStartOf="@+id/title"/> |
| |
| <TextView |
| android:id="@+id/title" |
| style="@style/BrowseGridTitleStyle" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/media_browse_grid_item_text_margin_top" |
| android:singleLine="true" |
| android:includeFontPadding="false" |
| android:duplicateParentState="true" |
| app:layout_constraintStart_toEndOf="@+id/explicit_icon_with_title" |
| app:layout_constraintTop_toBottomOf="@+id/item_container" |
| app:layout_constraintEnd_toEndOf="parent"/> |
| |
| <ImageView |
| android:id="@+id/download_icon_with_subtitle" |
| android:layout_width="@dimen/media_browse_indicator_size" |
| android:layout_height="@dimen/media_browse_indicator_size" |
| android:src="@drawable/ic_file_download_done_black" |
| android:tint="@color/icon_tint" |
| app:layout_constraintBottom_toBottomOf="@+id/subtitle" |
| app:layout_constraintTop_toTopOf="@+id/subtitle" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toStartOf="@+id/explicit_icon_with_subtitle"/> |
| |
| <ImageView |
| android:id="@+id/explicit_icon_with_subtitle" |
| android:layout_width="@dimen/media_browse_indicator_size" |
| android:layout_height="@dimen/media_browse_indicator_size" |
| android:src="@drawable/ic_explicit_black" |
| android:tint="@color/icon_tint" |
| app:layout_constraintBottom_toBottomOf="@+id/subtitle" |
| app:layout_constraintTop_toTopOf="@+id/subtitle" |
| app:layout_constraintStart_toEndOf="@+id/download_icon_with_subtitle"/> |
| |
| <TextView |
| android:id="@+id/subtitle" |
| style="@style/BrowseGridSubtitleStyle" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:singleLine="true" |
| android:includeFontPadding="false" |
| android:duplicateParentState="true" |
| android:layout_marginTop="@dimen/media_browse_subtitle_margin_top" |
| app:layout_constraintTop_toBottomOf="@+id/title" |
| app:layout_constraintStart_toEndOf="@+id/explicit_icon_with_subtitle" |
| app:layout_constraintEnd_toEndOf="parent"/> |
| |
| <ProgressBar |
| android:id="@+id/browse_item_progress_bar" |
| style="?android:attr/progressBarStyleHorizontal" |
| android:layout_width="0dp" |
| android:layout_height="@dimen/media_browse_progress_bar_height" |
| android:layout_marginTop="@dimen/media_browse_progress_bar_top_grid_margin" |
| android:layout_marginBottom="@dimen/media_browse_progress_bar_bottom_grid_margin" |
| android:layout_marginEnd="@dimen/media_browse_progress_bar_bottom_grid_margin" |
| app:layout_constraintHorizontal_chainStyle="spread_inside" |
| app:layout_constraintTop_toBottomOf="@+id/subtitle" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toStartOf="@+id/browse_item_progress_new" |
| android:visibility="gone"/> |
| |
| <ImageView |
| android:id="@+id/browse_item_progress_new" |
| android:src="@drawable/browser_progress_new_indicator" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center_vertical" |
| app:layout_constraintHorizontal_chainStyle="spread_inside" |
| app:layout_constraintTop_toBottomOf="@+id/subtitle" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintEnd_toEndOf="parent" |
| android:visibility="gone"/> |
| |
| </androidx.constraintlayout.widget.ConstraintLayout> |