Fixed UI issue with recordings when in edit mode
This commit is contained in:
parent
a45549d360
commit
619a13eb97
1 changed files with 35 additions and 28 deletions
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
|
@ -20,7 +21,7 @@
|
|||
type="org.linphone.activities.main.viewmodels.ListTopBarViewModel" />
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:onClick="@{clickListener}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
|
@ -32,34 +33,49 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/record_play_pause"
|
||||
android:onClick="@{playListener}"
|
||||
android:selected="@{data.isPlaying}"
|
||||
android:contentDescription="@string/content_description_recording_toggle_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/content_description_recording_toggle_play"
|
||||
android:onClick="@{playListener}"
|
||||
android:padding="5dp"
|
||||
android:selected="@{data.isPlaying}"
|
||||
android:src="@drawable/recording_play_pause" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{() -> selectionListViewModel.onToggleSelect(position)}"
|
||||
android:visibility="@{selectionListViewModel.isEditionEnabled ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:checked="@{selectionListViewModel.selectedItems.contains(position)}"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/export"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:onClick="@{() -> data.export()}"
|
||||
android:src="@drawable/icon_share"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/delete" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toEndOf="@id/record_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@id/export"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toLeftOf="@id/export"
|
||||
android:layout_toRightOf="@id/record_play_pause">
|
||||
android:layout_marginRight="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/record_description"
|
||||
|
@ -119,9 +135,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:max="@{data.duration}"
|
||||
android:progress="@{data.position}"
|
||||
android:progressTint="?attr/accentColor"
|
||||
|
@ -129,15 +145,6 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/export"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="@{() -> data.export()}"
|
||||
android:src="@drawable/icon_share" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
|
|
Loading…
Reference in a new issue