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 ...@@ -470,11 +470,11 @@ class TVCallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView
binding.contactBubbleNumTxt.visibility = View.GONE binding.contactBubbleNumTxt.visibility = View.GONE
binding.contactBubbleTxt.text = username binding.contactBubbleTxt.text = username
} }
binding.contactBubble.setImageDrawable(AvatarDrawable.Builder() binding.contactBubble.setAvatar(AvatarDrawable.Builder()
.withContact(participantInfo[0].contact) .withContact(participantInfo[0].contact)
.withCircleCrop(true) .withCircleCrop(true)
.withPresence(false) .withPresence(false)
.build(requireActivity())) .build(requireContext()))
generateParticipantOverlay(participantInfo) generateParticipantOverlay(participantInfo)
} }
......
...@@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="50"> android:layout_weight="50">
<ImageView <cx.ring.views.AvatarView
android:id="@+id/contact_bubble" android:id="@+id/contact_bubble"
android:layout_width="160dp" android:layout_width="160dp"
android:layout_height="160dp" android:layout_height="160dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
tools:src="@drawable/ic_contact_picture_fallback" /> tools:uri="@tools:sample/first_names"
tools:avatar="@tools:sample/avatars"/>
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
...@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_color_primary_dark" android:textColor="@color/text_color_primary_dark"
android:transitionName="shared_element" android:transitionName="shared_element"
tools:text="Contact Name" /> tools:text="@tools:sample/full_names" />
<TextView <TextView
android:id="@+id/contact_bubble_num_txt" android:id="@+id/contact_bubble_num_txt"
...@@ -105,8 +106,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -105,8 +106,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/text_color_secondary_dark" android:textColor="@color/abc_secondary_text_material_dark"
tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> tools:text="jami:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<TextView <TextView
android:id="@+id/call_status_txt" android:id="@+id/call_status_txt"
...@@ -181,7 +182,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -181,7 +182,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:textSize="12sp" android:textSize="12sp"
tools:text="Thomas"/> android:textColor="@color/text_color_primary_dark"
tools:text="@tools:sample/full_names"/>
</LinearLayout> </LinearLayout>
...@@ -194,34 +196,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -194,34 +196,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:gravity="center_horizontal"> android:gravity="center_horizontal">
<com.google.android.material.floatingactionbutton.FloatingActionButton <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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/action_call_hangup" android:contentDescription="@string/action_call_mute"
android:tint="@android:color/white" android:tint="@color/black"
android:visibility="gone" android:visibility="gone"
app:backgroundTint="@color/colorError" app:srcCompat="@drawable/baseline_mic_on_24"
app:rippleColor="@android:color/white"
app:srcCompat="@drawable/baseline_call_end_24"
tools:visibility="visible" /> tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/action_call_mute" android:contentDescription="@string/action_call_hangup"
android:tint="@android:color/white" android:tint="@android:color/white"
android:visibility="gone" android:visibility="gone"
app:backgroundTint="@color/colorError"
app:rippleColor="@android:color/white" app:rippleColor="@android:color/white"
app:srcCompat="@drawable/baseline_mic_on_24" app:srcCompat="@drawable/baseline_call_end_24"
tools:visibility="visible" /> tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
...@@ -233,6 +234,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -233,6 +234,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/bottomSheet_add_participants_btn" android:contentDescription="@string/bottomSheet_add_participants_btn"
android:tint="@color/black"
android:visibility="gone" android:visibility="gone"
app:srcCompat="@drawable/baseline_person_add_24" app:srcCompat="@drawable/baseline_person_add_24"
tools:visibility="visible" /> tools:visibility="visible" />
......
...@@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -65,12 +65,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="50"> android:layout_weight="50">
<ImageView <cx.ring.views.AvatarView
android:id="@+id/contact_bubble" android:id="@+id/contact_bubble"
android:layout_width="160dp" android:layout_width="160dp"
android:layout_height="160dp" android:layout_height="160dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
tools:src="@drawable/ic_contact_picture_fallback" /> tools:uri="@tools:sample/first_names"
tools:avatar="@tools:sample/avatars"/>
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
...@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_color_primary_dark" android:textColor="@color/text_color_primary_dark"
android:transitionName="shared_element" android:transitionName="shared_element"
tools:text="Contact Name" /> tools:text="@tools:sample/full_names" />
<TextView <TextView
android:id="@+id/contact_bubble_num_txt" android:id="@+id/contact_bubble_num_txt"
...@@ -181,7 +182,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -181,7 +182,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:textSize="12sp" android:textSize="12sp"
tools:text="Thomas" /> tools:text="@tools:sample/full_names"/>
</LinearLayout> </LinearLayout>
...@@ -194,34 +195,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -194,34 +195,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:gravity="center_horizontal"> android:gravity="center_horizontal">
<com.google.android.material.floatingactionbutton.FloatingActionButton <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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/action_call_hangup" android:contentDescription="@string/action_call_mute"
android:tint="@android:color/white" android:tint="@color/black"
android:visibility="gone" android:visibility="gone"
app:backgroundTint="@color/colorError" app:srcCompat="@drawable/baseline_mic_on_24"
app:rippleColor="@android:color/white"
app:srcCompat="@drawable/baseline_call_end_24"
tools:visibility="visible" /> tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/action_call_mute" android:contentDescription="@string/action_call_hangup"
android:tint="@android:color/white" android:tint="@android:color/white"
android:visibility="gone" android:visibility="gone"
app:backgroundTint="@color/colorError"
app:rippleColor="@android:color/white" app:rippleColor="@android:color/white"
app:srcCompat="@drawable/baseline_mic_on_24" app:srcCompat="@drawable/baseline_call_end_24"
tools:visibility="visible" /> tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
...@@ -233,6 +233,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -233,6 +233,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:contentDescription="@string/bottomSheet_add_participants_btn" android:contentDescription="@string/bottomSheet_add_participants_btn"
android:tint="@color/black"
android:visibility="gone" android:visibility="gone"
app:srcCompat="@drawable/baseline_person_add_24" app:srcCompat="@drawable/baseline_person_add_24"
tools:visibility="visible" /> tools:visibility="visible" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment