Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94cc0775 authored by tim peng's avatar tim peng Committed by Automerger Merge Worker
Browse files

Merge "Output switcher panel requires large title icon for Slice slider style"...

Merge "Output switcher panel requires large title icon for Slice slider style" into rvc-dev am: c21406a0 am: b2ab3dff

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11818502

Change-Id: I769ad89870ac16016683e8cfaed2488e4a6d78a7
parents 8db9c072 b2ab3dff
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020 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/slice_slider_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <androidx.slice.widget.SliceView
        android:id="@+id/slice_view"
        style="@style/Widget.SliceView.Panel.Slider.LargeIcon"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="0dp"
        android:paddingEnd="0dp"/>
</LinearLayout>
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
@@ -533,6 +533,10 @@
        <item name="rowStyle">@style/SliceRow.Slider</item>
    </style>

    <style name="Widget.SliceView.Panel.Slider.LargeIcon">
        <item name="rowStyle">@style/SliceRow.Slider.LargeIcon</item>
    </style>

    <style name="SliceRow">
        <!-- 2dp start padding for the start icon -->
        <item name="titleItemStartPadding">2dp</item>
@@ -580,6 +584,11 @@
        <item name="progressBarEndPadding">16dp</item>
    </style>

    <style name="SliceRow.Slider.LargeIcon">
        <!-- Layout is 48dp and actual icon size is 48-(iconSize/2) -->
        <item name="iconSize">12dp</item>
    </style>

    <style name="DisclaimerPositiveButton" parent="@style/SudGlifButton.Primary">
        <item name="android:layout_margin">16dp</item>
        <item name="android:paddingStart">8dp</item>
+1 −1
Original line number Diff line number Diff line
@@ -159,6 +159,6 @@ public class MediaOutputGroupPanel implements PanelContent, LocalMediaManager.De

    @Override
    public int getViewType() {
        return PanelContent.VIEW_TYPE_SLIDER;
        return PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ public class MediaOutputPanel implements PanelContent, LocalMediaManager.DeviceC

    @Override
    public int getViewType() {
        return PanelContent.VIEW_TYPE_SLIDER;
        return PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
    }

    private final MediaController.Callback mCb = new MediaController.Callback() {
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import java.util.List;
public interface PanelContent extends Instrumentable {

    int VIEW_TYPE_SLIDER = 1;
    int VIEW_TYPE_SLIDER_LARGE_ICON = 2;

    /**
     * @return a icon for the title of the Panel.
Loading