summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorRoberto Perez <robertoalexis@google.com>2018-05-15 17:25:46 -0700
committerRoberto Perez <robertoalexis@google.com>2018-05-18 14:28:20 -0700
commit1d3e7e02676ed495b9f99701fa4647aa524d3f1b (patch)
tree978f40544280f2e2be23f64ded330a4f7f259d79 /res
parentfc30bbfdb4221ecd18adf59501d5ca82ca631310 (diff)
downloadMedia-1d3e7e02676ed495b9f99701fa4647aa524d3f1b.tar.gz
Fixing navigation when content forward browsing is disabled.
Bug: 78908883 Test: Launched in Mojave Change-Id: I453d306665ca6f446c12b38b381d352a91d311b9 Merged-In: I453d306665ca6f446c12b38b381d352a91d311b9
Diffstat (limited to 'res')
-rw-r--r--res/layout-h1200dp/fragment_metadata.xml65
-rw-r--r--res/layout-h1200dp/fragment_metadata_with_queue.xml (renamed from res/layout/fragment_metadata_with_queue.xml)1
-rw-r--r--res/layout-h1200dp/fragment_playback_with_queue.xml (renamed from res/layout/fragment_playback_with_queue.xml)0
-rw-r--r--res/layout/fragment_metadata.xml34
-rw-r--r--res/layout/media_activity.xml4
-rw-r--r--res/values-h1200dp/bools.xml2
-rw-r--r--res/values-h1200dp/dimens.xml (renamed from res/values-h600dp/dimens.xml)5
-rw-r--r--res/values/bools.xml4
-rw-r--r--res/values/dimens.xml1
9 files changed, 88 insertions, 28 deletions
diff --git a/res/layout-h1200dp/fragment_metadata.xml b/res/layout-h1200dp/fragment_metadata.xml
new file mode 100644
index 0000000..63412aa
--- /dev/null
+++ b/res/layout-h1200dp/fragment_metadata.xml
@@ -0,0 +1,65 @@
+<?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.
+-->
+<merge
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:showIn="@layout/fragment_playback">
+
+ <ImageView
+ android:id="@+id/album_art"
+ android:layout_width="@dimen/playback_album_art_size_large"
+ android:layout_height="@dimen/playback_album_art_size_large"
+ android:layout_marginEnd="@dimen/car_keyline_2"
+ android:layout_marginStart="@dimen/car_keyline_2"
+ android:contentDescription="@string/album_art"
+ android:background="@color/car_body1_light"
+ android:scaleType="centerCrop"
+ android:transitionName="@string/album_art"
+ app:layout_constraintBottom_toTopOf="@id/metadata_subcontainer"
+ app:layout_constraintEnd_toEndOf="@+id/margin_end"
+ app:layout_constraintStart_toStartOf="@+id/margin_start"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_chainStyle="packed"
+ tools:src="@drawable/ic_person"/>
+
+ <include
+ android:id="@+id/metadata_subcontainer"
+ layout="@layout/metadata_normal"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/car_padding_5"
+ android:layout_marginBottom="@dimen/playback_controls_margin"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="@+id/album_art"
+ app:layout_constraintStart_toStartOf="@+id/album_art"
+ app:layout_constraintTop_toBottomOf="@+id/album_art"/>
+
+ <androidx.car.widget.PagedListView
+ android:id="@+id/queue_list"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_marginTop="@dimen/playback_album_art_size_normal"
+ android:layout_marginBottom="@dimen/playback_controls_margin"
+ android:visibility="gone"
+ app:dividerEndMargin="@dimen/car_keyline_1"
+ app:dividerStartMargin="@dimen/car_keyline_1"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/margin_top"
+ app:listDividerColor="@color/car_list_divider_light"/>
+</merge>
diff --git a/res/layout/fragment_metadata_with_queue.xml b/res/layout-h1200dp/fragment_metadata_with_queue.xml
index f3474f0..26bfb26 100644
--- a/res/layout/fragment_metadata_with_queue.xml
+++ b/res/layout-h1200dp/fragment_metadata_with_queue.xml
@@ -28,6 +28,7 @@
android:layout_marginTop="@dimen/car_padding_4"
android:layout_marginStart="@dimen/car_keyline_1"
android:contentDescription="@string/album_art"
+ android:background="@color/car_body1_light"
android:scaleType="centerCrop"
android:transitionName="@string/album_art"
app:layout_constraintTop_toTopOf="parent"
diff --git a/res/layout/fragment_playback_with_queue.xml b/res/layout-h1200dp/fragment_playback_with_queue.xml
index 113de90..113de90 100644
--- a/res/layout/fragment_playback_with_queue.xml
+++ b/res/layout-h1200dp/fragment_playback_with_queue.xml
diff --git a/res/layout/fragment_metadata.xml b/res/layout/fragment_metadata.xml
index ffeaf95..4324681 100644
--- a/res/layout/fragment_metadata.xml
+++ b/res/layout/fragment_metadata.xml
@@ -18,22 +18,21 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- tools:showIn="@layout/fragment_playback">
+ tools:showIn="@layout/fragment_playback_with_queue">
+
<ImageView
android:id="@+id/album_art"
- android:layout_width="@dimen/playback_album_art_size_large"
- android:layout_height="@dimen/playback_album_art_size_large"
- android:layout_marginEnd="@dimen/car_keyline_2"
- android:layout_marginStart="@dimen/car_keyline_2"
+ android:layout_width="@dimen/playback_album_art_size_normal"
+ android:layout_height="@dimen/playback_album_art_size_normal"
+ android:layout_marginStart="@dimen/car_keyline_1"
android:contentDescription="@string/album_art"
+ android:background="@color/car_body1_light"
android:scaleType="centerCrop"
android:transitionName="@string/album_art"
- app:layout_constraintBottom_toTopOf="@id/metadata_subcontainer"
- app:layout_constraintEnd_toEndOf="@+id/margin_end"
- app:layout_constraintStart_toStartOf="@+id/margin_start"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintVertical_chainStyle="packed"
+ app:layout_constraintBottom_toTopOf="@+id/playback_controls"
+ app:layout_constraintStart_toStartOf="@+id/margin_start"
tools:src="@drawable/ic_person"/>
<include
@@ -41,24 +40,25 @@
layout="@layout/metadata_normal"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/car_padding_5"
- android:layout_marginBottom="@dimen/playback_controls_margin"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="@+id/album_art"
- app:layout_constraintStart_toStartOf="@+id/album_art"
- app:layout_constraintTop_toBottomOf="@+id/album_art"/>
+ android:layout_marginStart="@dimen/car_padding_4"
+ android:layout_marginEnd="@dimen/car_keyline_1"
+ app:layout_constraintBottom_toBottomOf="@+id/album_art"
+ app:layout_constraintEnd_toEndOf="@+id/margin_end"
+ app:layout_constraintStart_toEndOf="@+id/album_art"
+ app:layout_constraintTop_toTopOf="@+id/album_art"/>
<androidx.car.widget.PagedListView
android:id="@+id/queue_list"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_marginTop="@dimen/playback_album_art_size_normal"
+ android:layout_marginTop="@dimen/car_padding_4"
android:layout_marginBottom="@dimen/playback_controls_margin"
android:visibility="gone"
app:dividerEndMargin="@dimen/car_keyline_1"
app:dividerStartMargin="@dimen/car_keyline_1"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/margin_top"
+ app:layout_constraintTop_toBottomOf="@+id/album_art"
app:listDividerColor="@color/car_list_divider_light"/>
+
</merge>
diff --git a/res/layout/media_activity.xml b/res/layout/media_activity.xml
index c719337..050a9c8 100644
--- a/res/layout/media_activity.xml
+++ b/res/layout/media_activity.xml
@@ -39,7 +39,6 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_marginTop="@dimen/car_padding_4"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@+id/app_bar"
app:layout_constraintBottom_toTopOf="@+id/browse_controls_container"/>
@@ -48,7 +47,6 @@
android:id="@+id/playback_container"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_marginTop="@dimen/car_padding_4"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/app_bar"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -86,7 +84,7 @@
<com.android.car.media.widgets.AppBarView
android:id="@+id/app_bar"
- android:layout_height="@dimen/appbar_height"
+ android:layout_height="@dimen/car_app_bar_height"
android:layout_width="match_parent"
app:layout_constraintTop_toTopOf="parent"/>
diff --git a/res/values-h1200dp/bools.xml b/res/values-h1200dp/bools.xml
index 34eae64..b1476c8 100644
--- a/res/values-h1200dp/bools.xml
+++ b/res/values-h1200dp/bools.xml
@@ -15,6 +15,6 @@
limitations under the License.
-->
<resources>
+ <!-- On screens tall enough we enable content forward browsing -->
<bool name="forward_content_browse_enabled">true</bool>
- <bool name="force_browse_tabs">true</bool>
</resources> \ No newline at end of file
diff --git a/res/values-h600dp/dimens.xml b/res/values-h1200dp/dimens.xml
index 25639cf..6032220 100644
--- a/res/values-h600dp/dimens.xml
+++ b/res/values-h1200dp/dimens.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- Copyright (C) 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.
@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
- <dimen name="now_playing_metadata_top_margin">32dp</dimen>
+ <!-- Application Bar -->
+ <dimen name="car_app_bar_height">116dp</dimen>
</resources>
diff --git a/res/values/bools.xml b/res/values/bools.xml
index b9bd29e..3247ad9 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -17,8 +17,4 @@
<resources>
<!-- Whether forward content browse is enabled -->
<bool name="forward_content_browse_enabled">false</bool>
-
- <!-- Force the presentation of tabs even if the number of browsable items exceeds the
- maximum number of allowed tabs (this is mainly for demo purposes) -->
- <bool name="force_browse_tabs">false</bool>
</resources> \ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index bc9b767..f4a7439 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -23,7 +23,6 @@
<!-- Music now playing screen -->
<dimen name="music_action_icon_inset">0dp</dimen>
<dimen name="music_action_ripple_inset">32dp</dimen>
- <dimen name="now_playing_metadata_top_margin">0dp</dimen>
<dimen name="missing_permission_icon_size">128dp</dimen>