From f1d5a4edbeeb947b4358d9688e404d065e423caf Mon Sep 17 00:00:00 2001 From: Adrien Beraud <adrien.beraud@savoirfairelinux.com> Date: Mon, 21 Apr 2025 11:35:24 -0400 Subject: [PATCH] tv: call cleanup Change-Id: I7bedf5483cb24db9ed3f3c959bef4a27892db705 --- .../java/cx/ring/tv/call/TVCallFragment.kt | 4 +-- .../res/layout-w720dp-land/tv_frag_call.xml | 32 ++++++++++--------- .../app/src/main/res/layout/tv_frag_call.xml | 27 ++++++++-------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/jami-android/app/src/main/java/cx/ring/tv/call/TVCallFragment.kt b/jami-android/app/src/main/java/cx/ring/tv/call/TVCallFragment.kt index 216d8ebd1..2beb46854 100644 --- a/jami-android/app/src/main/java/cx/ring/tv/call/TVCallFragment.kt +++ b/jami-android/app/src/main/java/cx/ring/tv/call/TVCallFragment.kt @@ -470,11 +470,11 @@ class TVCallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView binding.contactBubbleNumTxt.visibility = View.GONE binding.contactBubbleTxt.text = username } - binding.contactBubble.setImageDrawable(AvatarDrawable.Builder() + binding.contactBubble.setAvatar(AvatarDrawable.Builder() .withContact(participantInfo[0].contact) .withCircleCrop(true) .withPresence(false) - .build(requireActivity())) + .build(requireContext())) generateParticipantOverlay(participantInfo) } diff --git a/jami-android/app/src/main/res/layout-w720dp-land/tv_frag_call.xml b/jami-android/app/src/main/res/layout-w720dp-land/tv_frag_call.xml index bc09d0a19..ee6a43e6c 100644 --- a/jami-android/app/src/main/res/layout-w720dp-land/tv_frag_call.xml +++ b/jami-android/app/src/main/res/layout-w720dp-land/tv_frag_call.xml @@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_height="match_parent" android:layout_weight="50"> - <ImageView + <cx.ring.views.AvatarView android:id="@+id/contact_bubble" android:layout_width="160dp" android:layout_height="160dp" android:layout_centerInParent="true" - tools:src="@drawable/ic_contact_picture_fallback" /> + tools:uri="@tools:sample/first_names" + tools:avatar="@tools:sample/avatars"/> </RelativeLayout> <LinearLayout @@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="@color/text_color_primary_dark" android:transitionName="shared_element" - tools:text="Contact Name" /> + tools:text="@tools:sample/full_names" /> <TextView android:id="@+id/contact_bubble_num_txt" @@ -105,8 +106,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:paddingEnd="32dp" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="@color/text_color_secondary_dark" - tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> + android:textColor="@color/abc_secondary_text_material_dark" + tools:text="jami:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> <TextView android:id="@+id/call_status_txt" @@ -181,7 +182,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_height="wrap_content" android:layout_marginStart="8dp" android:textSize="12sp" - tools:text="Thomas"/> + android:textColor="@color/text_color_primary_dark" + tools:text="@tools:sample/full_names"/> </LinearLayout> @@ -194,34 +196,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:gravity="center_horizontal"> <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/call_hangup_btn" + android:id="@+id/call_mute_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" - android:contentDescription="@string/action_call_hangup" - android:tint="@android:color/white" + android:contentDescription="@string/action_call_mute" + android:tint="@color/black" android:visibility="gone" - app:backgroundTint="@color/colorError" - app:rippleColor="@android:color/white" - app:srcCompat="@drawable/baseline_call_end_24" + app:srcCompat="@drawable/baseline_mic_on_24" tools:visibility="visible" /> <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/call_mute_btn" + android:id="@+id/call_hangup_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" - android:contentDescription="@string/action_call_mute" + android:contentDescription="@string/action_call_hangup" android:tint="@android:color/white" android:visibility="gone" + app:backgroundTint="@color/colorError" app:rippleColor="@android:color/white" - app:srcCompat="@drawable/baseline_mic_on_24" + app:srcCompat="@drawable/baseline_call_end_24" tools:visibility="visible" /> <com.google.android.material.floatingactionbutton.FloatingActionButton @@ -233,6 +234,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" android:contentDescription="@string/bottomSheet_add_participants_btn" + android:tint="@color/black" android:visibility="gone" app:srcCompat="@drawable/baseline_person_add_24" tools:visibility="visible" /> diff --git a/jami-android/app/src/main/res/layout/tv_frag_call.xml b/jami-android/app/src/main/res/layout/tv_frag_call.xml index 9173390d0..5f932a1cc 100644 --- a/jami-android/app/src/main/res/layout/tv_frag_call.xml +++ b/jami-android/app/src/main/res/layout/tv_frag_call.xml @@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_height="match_parent" android:layout_weight="50"> - <ImageView + <cx.ring.views.AvatarView android:id="@+id/contact_bubble" android:layout_width="160dp" android:layout_height="160dp" android:layout_centerInParent="true" - tools:src="@drawable/ic_contact_picture_fallback" /> + tools:uri="@tools:sample/first_names" + tools:avatar="@tools:sample/avatars"/> </RelativeLayout> <LinearLayout @@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="@color/text_color_primary_dark" android:transitionName="shared_element" - tools:text="Contact Name" /> + tools:text="@tools:sample/full_names" /> <TextView android:id="@+id/contact_bubble_num_txt" @@ -181,7 +182,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_height="wrap_content" android:layout_marginStart="8dp" android:textSize="12sp" - tools:text="Thomas" /> + tools:text="@tools:sample/full_names"/> </LinearLayout> @@ -194,34 +195,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:gravity="center_horizontal"> <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/call_hangup_btn" + android:id="@+id/call_mute_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" - android:contentDescription="@string/action_call_hangup" - android:tint="@android:color/white" + android:contentDescription="@string/action_call_mute" + android:tint="@color/black" android:visibility="gone" - app:backgroundTint="@color/colorError" - app:rippleColor="@android:color/white" - app:srcCompat="@drawable/baseline_call_end_24" + app:srcCompat="@drawable/baseline_mic_on_24" tools:visibility="visible" /> <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/call_mute_btn" + android:id="@+id/call_hangup_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" - android:contentDescription="@string/action_call_mute" + android:contentDescription="@string/action_call_hangup" android:tint="@android:color/white" android:visibility="gone" + app:backgroundTint="@color/colorError" app:rippleColor="@android:color/white" - app:srcCompat="@drawable/baseline_mic_on_24" + app:srcCompat="@drawable/baseline_call_end_24" tools:visibility="visible" /> <com.google.android.material.floatingactionbutton.FloatingActionButton @@ -233,6 +233,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. android:layout_marginEnd="16dp" android:layout_marginBottom="48dp" android:contentDescription="@string/bottomSheet_add_participants_btn" + android:tint="@color/black" android:visibility="gone" app:srcCompat="@drawable/baseline_person_add_24" tools:visibility="visible" /> -- GitLab