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

Commit e8327b47 authored by Hongguang Chen's avatar Hongguang Chen
Browse files

Add TV volume bar appearance customization

ag/10483280 added the TV volume bar position customization. But its
appearance customization which set the bar to horizontal orientation is
still in TV device overlay. This change moves that to SystemUI to make
it clear.

Bug: 146436981
Test: make SystemUI and check the volume bar.
Change-Id: Ifb3f3c5bb24228049ed5cc8cd2ad9868f573c648
parent eaebc654
Loading
Loading
Loading
Loading
+69 −0
Original line number Original line Diff line number Diff line
<!--
     Copyright (C) 2015 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:tag="row"
    android:layout_width="@dimen/volume_dialog_row_width"
    android:layout_height="wrap_content"
    android:background="@android:color/transparent"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:theme="@style/qs_theme">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        android:gravity="center"
        android:layout_gravity="center"
        android:orientation="horizontal" >
        <com.android.keyguard.AlphaOptimizedImageButton
            android:id="@+id/volume_row_icon"
            style="@style/VolumeButtons"
            android:layout_width="@dimen/volume_dialog_tap_target_size"
            android:layout_height="@dimen/volume_dialog_tap_target_size"
            android:background="@drawable/ripple_drawable_20dp"
            android:tint="@color/accent_tint_color_selector"
            android:soundEffectsEnabled="false" />
        <TextView
            android:id="@+id/volume_row_header"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:maxLength="10"
            android:maxLines="1"
            android:visibility="gone"
            android:textColor="?android:attr/colorControlNormal"
            android:textAppearance="@style/TextAppearance.Volume.Header" />
        <FrameLayout
            android:id="@+id/volume_row_slider_frame"
            android:layout_height="match_parent"
            android:layoutDirection="ltr"
            android:layout_width="@dimen/volume_dialog_row_width">
            <SeekBar
                android:id="@+id/volume_row_slider"
                android:clickable="false"
                android:layout_width="@dimen/volume_dialog_row_width"
                android:layout_height="match_parent"
                android:layoutDirection="ltr"
                android:layout_gravity="center"
                android:rotation="0" />
        </FrameLayout>
    </LinearLayout>

    <include layout="@layout/volume_dnd_icon"/>

</FrameLayout>
+21 −0
Original line number Original line 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.
-->

<resources>
  <!-- Width of volume bar -->
  <dimen name="volume_dialog_row_width">252dp</dimen>
  <dimen name="volume_dialog_tap_target_size">36dp</dimen>
</resources>