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 216d8ebd1e89f50cbd90f0fd96bb7c0d9aee2a24..2beb46854f20727e84f5f9c981c538293c890683 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 bc09d0a1931d592aea5b55fffc8cab80c10d7f4b..ee6a43e6c2a576b633b7f88db8018b30993c6206 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 9173390d03eb6e39f722765ed47aadd6c43dfe56..5f932a1cc02ae691e3d83d29f048f33deb4d92a8 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" />