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

Commit 6211a679 authored by Ahmad Khalil's avatar Ahmad Khalil
Browse files

Add two tabs to the ringtone picker pop-up view.

We're converting the AlertDialog to a DialogFragment with a ViewPage and two tabs (Sound and Vibration). The Vibration tab will be empty for now, while the Sound tab will include a recyclerview with all available sounds.

Fix: 275541592
Test: com.android.soundpicker.RingtonePickerViewModelTest
Change-Id: Idda019d2ef460785d2b2fd9df35858d4650829fc
parent 855cd90c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@ android_library {
        "androidx.appcompat_appcompat",
        "hilt_android",
        "guava",
        "androidx.recyclerview_recyclerview",
        "androidx-constraintlayout_constraintlayout",
        "androidx.viewpager2_viewpager2",
        "com.google.android.material_material",
    ],
}

+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@
            <intent-filter>
                <action android:name="android.intent.action.RINGTONE_PICKER" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.RINGTONE_PICKER_SOUND" />
                <category android:name="android.intent.category.RINGTONE_PICKER_VIBRATION" />
                <category android:name="android.intent.category.RINGTONE_PICKER_RINGTONE" />
            </intent-filter>
        </activity>
    </application>
+4 −3
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,6 +16,6 @@
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical" />
 No newline at end of file
              android:layout_height="match_parent"/>
 No newline at end of file
+10 −8
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
    android:background="?android:attr/selectableItemBackground">
              android:background="?android:attr/selectableItemBackground"
              android:focusable="true"
              android:clickable="true">

    <ImageView
        android:layout_width="24dp"
@@ -31,7 +33,7 @@
        android:layout_marginLeft="24dp"
        android:src="@drawable/ic_add"/>

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    <TextView
        android:id="@+id/add_new_sound_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2023 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.
-->
<androidx.recyclerview.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/recycler_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
/>
 No newline at end of file
Loading