Loading core/java/com/android/internal/widget/MediaNotificationView.java +3 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public class MediaNotificationView extends FrameLayout { private View mActions; private View mHeader; private View mMainColumn; private View mMediaContent; private int mImagePushIn; public MediaNotificationView(Context context) { Loading Loading @@ -70,7 +71,7 @@ public class MediaNotificationView extends FrameLayout { (MarginLayoutParams) mRightIcon.getLayoutParams(); int imageEndMargin = layoutParams.getMarginEnd(); size -= imageEndMargin; int fullHeight = getMeasuredHeight(); int fullHeight = mMediaContent.getMeasuredHeight(); if (size > fullHeight) { size = fullHeight; } else if (size < fullHeight) { Loading Loading @@ -154,5 +155,6 @@ public class MediaNotificationView extends FrameLayout { mActions = findViewById(com.android.internal.R.id.media_actions); mHeader = findViewById(com.android.internal.R.id.notification_header); mMainColumn = findViewById(com.android.internal.R.id.notification_main_column); mMediaContent = findViewById(com.android.internal.R.id.notification_media_content); } } core/res/res/layout/notification_material_media_seekbar.xml 0 → 100644 +64 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2019 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:id="@+id/notification_media_progress" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentBottom="true" > <SeekBar android:id="@+id/notification_media_progress_bar" style="@style/Widget.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxHeight="3dp" android:paddingTop="24dp" android:paddingBottom="24dp" android:layout_marginBottom="-24dp" android:layout_marginTop="-12dp" android:splitTrack="false" /> <FrameLayout android:id="@+id/notification_media_progress_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginBottom="11dp" > <!-- width is set to "match_parent" to avoid extra layout calls --> <TextView android:id="@+id/notification_media_elapsed_time" style="@style/Widget.DeviceDefault.Notification.Text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_marginStart="@dimen/notification_content_margin_start" android:gravity="left" /> <TextView android:id="@+id/notification_media_total_time" style="@style/Widget.DeviceDefault.Notification.Text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginEnd="@dimen/notification_content_margin_end" android:gravity="right" /> </FrameLayout> </LinearLayout> No newline at end of file core/res/res/layout/notification_template_material_big_media.xml +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/notification_media_content" > <LinearLayout android:id="@+id/notification_main_column" Loading Loading @@ -84,5 +85,9 @@ android:id="@+id/media_seamless" /> </LinearLayout> <ViewStub android:id="@+id/notification_media_seekbar_container" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </com.android.internal.widget.MediaNotificationView> core/res/res/layout/notification_template_material_media.xml +47 −35 Original line number Diff line number Diff line Loading @@ -33,6 +33,12 @@ <include layout="@layout/notification_template_header" android:layout_width="match_parent" android:layout_height="@dimen/media_notification_header_height" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/notification_media_content" > <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" Loading @@ -40,6 +46,7 @@ android:orientation="horizontal" android:layout_marginStart="@dimen/notification_content_margin_start" android:layout_marginTop="@dimen/notification_content_margin_top" android:layout_alignParentTop="true" android:tag="media" > <LinearLayout Loading @@ -61,7 +68,6 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_marginStart="10dp" android:layout_marginBottom="@dimen/media_notification_actions_padding_bottom" android:layoutDirection="ltr" android:orientation="horizontal" > Loading @@ -79,4 +85,10 @@ /> </LinearLayout> </LinearLayout> <ViewStub android:id="@+id/notification_media_seekbar_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> </LinearLayout> </FrameLayout> core/res/res/values/symbols.xml +7 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,12 @@ <java-symbol type="id" name="action3" /> <java-symbol type="id" name="action4" /> <java-symbol type="id" name="media_seamless" /> <java-symbol type="id" name="notification_media_seekbar_container" /> <java-symbol type="id" name="notification_media_content" /> <java-symbol type="id" name="notification_media_progress" /> <java-symbol type="id" name="notification_media_progress_bar" /> <java-symbol type="id" name="notification_media_elapsed_time" /> <java-symbol type="id" name="notification_media_total_time" /> <java-symbol type="id" name="big_picture" /> <java-symbol type="id" name="big_text" /> <java-symbol type="id" name="chronometer" /> Loading Loading @@ -1572,6 +1578,7 @@ <java-symbol type="layout" name="immersive_mode_cling" /> <java-symbol type="layout" name="user_switching_dialog" /> <java-symbol type="layout" name="common_tab_settings" /> <java-symbol type="layout" name="notification_material_media_seekbar" /> <java-symbol type="anim" name="slide_in_child_bottom" /> <java-symbol type="anim" name="slide_in_right" /> Loading Loading
core/java/com/android/internal/widget/MediaNotificationView.java +3 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public class MediaNotificationView extends FrameLayout { private View mActions; private View mHeader; private View mMainColumn; private View mMediaContent; private int mImagePushIn; public MediaNotificationView(Context context) { Loading Loading @@ -70,7 +71,7 @@ public class MediaNotificationView extends FrameLayout { (MarginLayoutParams) mRightIcon.getLayoutParams(); int imageEndMargin = layoutParams.getMarginEnd(); size -= imageEndMargin; int fullHeight = getMeasuredHeight(); int fullHeight = mMediaContent.getMeasuredHeight(); if (size > fullHeight) { size = fullHeight; } else if (size < fullHeight) { Loading Loading @@ -154,5 +155,6 @@ public class MediaNotificationView extends FrameLayout { mActions = findViewById(com.android.internal.R.id.media_actions); mHeader = findViewById(com.android.internal.R.id.notification_header); mMainColumn = findViewById(com.android.internal.R.id.notification_main_column); mMediaContent = findViewById(com.android.internal.R.id.notification_media_content); } }
core/res/res/layout/notification_material_media_seekbar.xml 0 → 100644 +64 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2019 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:id="@+id/notification_media_progress" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentBottom="true" > <SeekBar android:id="@+id/notification_media_progress_bar" style="@style/Widget.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxHeight="3dp" android:paddingTop="24dp" android:paddingBottom="24dp" android:layout_marginBottom="-24dp" android:layout_marginTop="-12dp" android:splitTrack="false" /> <FrameLayout android:id="@+id/notification_media_progress_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginBottom="11dp" > <!-- width is set to "match_parent" to avoid extra layout calls --> <TextView android:id="@+id/notification_media_elapsed_time" style="@style/Widget.DeviceDefault.Notification.Text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_marginStart="@dimen/notification_content_margin_start" android:gravity="left" /> <TextView android:id="@+id/notification_media_total_time" style="@style/Widget.DeviceDefault.Notification.Text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginEnd="@dimen/notification_content_margin_end" android:gravity="right" /> </FrameLayout> </LinearLayout> No newline at end of file
core/res/res/layout/notification_template_material_big_media.xml +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/notification_media_content" > <LinearLayout android:id="@+id/notification_main_column" Loading Loading @@ -84,5 +85,9 @@ android:id="@+id/media_seamless" /> </LinearLayout> <ViewStub android:id="@+id/notification_media_seekbar_container" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </com.android.internal.widget.MediaNotificationView>
core/res/res/layout/notification_template_material_media.xml +47 −35 Original line number Diff line number Diff line Loading @@ -33,6 +33,12 @@ <include layout="@layout/notification_template_header" android:layout_width="match_parent" android:layout_height="@dimen/media_notification_header_height" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/notification_media_content" > <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" Loading @@ -40,6 +46,7 @@ android:orientation="horizontal" android:layout_marginStart="@dimen/notification_content_margin_start" android:layout_marginTop="@dimen/notification_content_margin_top" android:layout_alignParentTop="true" android:tag="media" > <LinearLayout Loading @@ -61,7 +68,6 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_marginStart="10dp" android:layout_marginBottom="@dimen/media_notification_actions_padding_bottom" android:layoutDirection="ltr" android:orientation="horizontal" > Loading @@ -79,4 +85,10 @@ /> </LinearLayout> </LinearLayout> <ViewStub android:id="@+id/notification_media_seekbar_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> </LinearLayout> </FrameLayout>
core/res/res/values/symbols.xml +7 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,12 @@ <java-symbol type="id" name="action3" /> <java-symbol type="id" name="action4" /> <java-symbol type="id" name="media_seamless" /> <java-symbol type="id" name="notification_media_seekbar_container" /> <java-symbol type="id" name="notification_media_content" /> <java-symbol type="id" name="notification_media_progress" /> <java-symbol type="id" name="notification_media_progress_bar" /> <java-symbol type="id" name="notification_media_elapsed_time" /> <java-symbol type="id" name="notification_media_total_time" /> <java-symbol type="id" name="big_picture" /> <java-symbol type="id" name="big_text" /> <java-symbol type="id" name="chronometer" /> Loading Loading @@ -1572,6 +1578,7 @@ <java-symbol type="layout" name="immersive_mode_cling" /> <java-symbol type="layout" name="user_switching_dialog" /> <java-symbol type="layout" name="common_tab_settings" /> <java-symbol type="layout" name="notification_material_media_seekbar" /> <java-symbol type="anim" name="slide_in_child_bottom" /> <java-symbol type="anim" name="slide_in_right" /> Loading