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

Commit 2bbdd77a authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Expanded volume panel with sliders and mute buttons.

Bug: 3395734

Volume panel that can be expanded and can be used
to control different streams' volume and toggle
silent mode.

Shows the active stream's slider on top and the
remaining below. Touching outside dismisses the
dialog as well as a 3 second timeout.

Dialog fades out after timeout.

Change-Id: Ief258cc904bfd3d62f1291adba4a9cf442bcb006
parent cc84ea17
Loading
Loading
Loading
Loading
+393 −111

File changed.

Preview size limit exceeded, changes collapsed.

+773 B
Loading image diff...
+653 B
Loading image diff...
+30 −38
Original line number Diff line number Diff line
@@ -17,56 +17,48 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@android:drawable/dialog_full_holo_dark"
    android:gravity="left">

    <LinearLayout
        android:layout_width="416dip"
        android:layout_height="wrap_content"
        android:paddingLeft="16dip"
        android:paddingTop="16dip"
        android:paddingRight="16dip"
        android:paddingBottom="8dip"
        android:orientation="vertical">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dip"
        android:gravity="left">
    
        <ImageView
            android:id="@+id/other_stream_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="16dip" />
        android:layout_marginTop="80dip"
        android:background="@android:drawable/dialog_full_holo_dark"
        android:orientation="horizontal"
        >

        <TextView
        <LinearLayout
            android:id="@+id/slider_group"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/message"
            android:textAppearance="?android:attr/textAppearanceMedium" />

            android:orientation="vertical"
            >
            <!-- Sliders go here -->
        </LinearLayout>

    <TextView
        <ImageView
            android:id="@+id/expand_button_divider"
            android:src="?attr/dividerVertical"
            android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/additional_message"
        android:textAppearance="?android:attr/textAppearanceSmall" />
            android:layout_height="32dip"
            android:scaleType="fitXY"
            android:layout_gravity="top"
            android:layout_marginTop="16dip"
            android:layout_marginBottom="16dip"
            />

        <ImageView
        android:id="@+id/ringer_stream_icon"
            android:id="@+id/expand_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
        android:layout_marginTop="14dip" />
            android:layout_gravity="top"
            android:padding="16dip"
            android:background="?attr/selectableItemBackground"
            android:src="@drawable/ic_sysbar_quicksettings"
            />
        
    <ProgressBar
        style="?android:attr/progressBarStyleHorizontal"
        android:id="@+id/level"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    </LinearLayout>

</FrameLayout>

+45 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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:layout_width="wrap_content"
    android:layout_height="80dip"
    android:orientation="horizontal"
    android:layout_marginTop="8dip"
    android:layout_marginBottom="8dip"
    android:gravity="left|center_vertical">

    <ImageView
        android:id="@+id/stream_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="16dip"
        android:layout_marginLeft="8dip"
        android:background="?attr/selectableItemBackground"
        />

    <SeekBar
        style="?android:attr/seekBarStyle"
        android:id="@+id/seekbar"
        android:layout_width="300dip"
        android:layout_height="wrap_content"
        android:padding="16dip"
        android:layout_marginLeft="8dip"
        android:layout_marginRight="8dip" />

</LinearLayout>

Loading