Skip to content
Snippets Groups Projects
Commit f1d5a4ed authored by Adrien Béraud's avatar Adrien Béraud
Browse files

tv: call cleanup

Change-Id: I7bedf5483cb24db9ed3f3c959bef4a27892db705
parent 209b26fa
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
......@@ -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" />
......
......@@ -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" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment