VoIP: clean dial pad code + add close icon on bottom sheet

This commit is contained in:
ganfra 2021-01-07 12:21:09 +01:00
parent 201a346d41
commit 922ae5b041
5 changed files with 32 additions and 15 deletions

View file

@ -70,6 +70,9 @@ class CallDialPadBottomSheet private constructor() : VectorBaseBottomSheetDialog
} else {
setCallbackToFragment(callback)
}
views.callDialPadClose.setOnClickListener {
dismiss()
}
}
override fun onDestroyView() {

View file

@ -23,7 +23,6 @@ import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.core.widget.ImageViewCompat
import androidx.core.widget.addTextChangedListener
import androidx.fragment.app.Fragment
import com.android.dialer.dialpadview.DialpadView
import com.android.dialer.dialpadview.DigitsEditText
@ -120,7 +119,6 @@ class DialPadFragment : Fragment() {
return view
}
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putString(EXTRA_REGION_CODE, regionCode)

View file

@ -123,7 +123,6 @@ import im.vector.app.features.attachments.toGroupedContentAttachmentData
import im.vector.app.features.call.SharedActiveCallViewModel
import im.vector.app.features.call.VectorCallActivity
import im.vector.app.features.call.conference.JitsiCallViewModel
import im.vector.app.features.call.webrtc.WebRtcCallManager
import im.vector.app.features.command.Command
import im.vector.app.features.crypto.keysbackup.restore.KeysBackupRestoreActivity
import im.vector.app.features.crypto.util.toImageRes

View file

@ -1,21 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/callDialPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?riotx_bottom_sheet_background"
android:orientation="vertical">
<TextView
android:id="@+id/callDialPadTitle"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:id="@+id/callDialPadTitle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:padding="8dp"
android:text="@string/call_dial_pad_title"
android:textColor="?riotx_text_primary"
android:textSize="16sp"
android:layout_marginBottom="24dp"
android:text="@string/call_dial_pad_title" />
android:textSize="20sp" />
<ImageView
android:id="@+id/callDialPadClose"
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:scaleType="center"
app:tint="?riotx_text_primary"
android:foreground="?selectableItemBackground"
android:src="@drawable/ic_cross" />
</LinearLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/callDialPadFragmentContainer"