Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1975)

Unified Diff: chrome/android/java/res/layout/playback_notification_bar.xml

Issue 1427023003: [Cast,Android,PresentationAPI] Fix notification UI according to the feedback from the UI review (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@playpause-cast-notification
Patch Set: Revamped the change. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/res/layout/playback_notification_bar.xml
diff --git a/chrome/android/java/res/layout/playback_notification_bar.xml b/chrome/android/java/res/layout/playback_notification_bar.xml
index 0a79741e1bb629b755e27a66708efce03a1a5462..d52bc7c6a416ac70c7af7b9319206c8eab20d799 100644
--- a/chrome/android/java/res/layout/playback_notification_bar.xml
+++ b/chrome/android/java/res/layout/playback_notification_bar.xml
@@ -4,13 +4,28 @@
found in the LICENSE file. -->
<!--
- Notification layout for media controls.
+ Notification layout for media controls. Could have one or two buttons
+ depending on the corresponding media.
+ Local playback notification has one play/pause button on L+ but two buttons,
+ play/pause and stop button, on earlier Android versions as the notification
+ can't be dismissed by the swiping gesture.
+ Cast notification always has the stop button that stops casting but only has
+ the play/pause button if the Cast application controlled by the notification
+ supports play/pause.
+ The notification button ids are numbered from the right, so "R.id.button1" is
+ always present and "R.id.button2" may have the visibility GONE.
_______________________________________________________
| | | |
- | | Playing [media title] | |
- | ICON | =====0============================= | || |
+ | | [media title] | |
+ | ICON |======================================| || |
| | [www.example.com] | |
|________|______________________________________|_____|
+ _______________________________________________________
+ | | | | |
+ | | [Cast device name] | | |
+ | ICON |================================| || | X |
+ | | [www.example.com] | | |
+ |________|________________________________|_____|_____|
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@@ -64,28 +79,28 @@
</LinearLayout>
<ImageButton
- android:id="@+id/playpause"
+ android:id="@+id/button2"
android:src="@drawable/ic_vidcontrol_play"
- android:layout_width="wrap_content"
+ android:layout_width="40dp"
android:layout_height="match_parent"
- android:layout_marginEnd="8dp"
+ android:layout_marginStart="8dp"
android:gravity="center"
- android:padding="12dp"
+ android:padding="8dp"
android:scaleType="center"
android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@null"/>
+ android:contentDescription="@null"
+ android:visibility="gone"/>
<ImageButton
- android:id="@+id/stop"
+ android:id="@+id/button1"
android:src="@drawable/ic_vidcontrol_stop"
- android:layout_width="wrap_content"
+ android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:gravity="center"
- android:padding="12dp"
+ android:padding="8dp"
android:scaleType="center"
android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/accessibility_stop"
- android:visibility="gone"/>
+ android:contentDescription="@null"/>
</LinearLayout>
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698