Show progress bar on remote participant when not connected

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-09-16 00:14:10 +02:00
parent c2ef651ce3
commit a76e519219
3 changed files with 16 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
@ -96,6 +97,13 @@ public class ParticipantsAdapter extends BaseAdapter {
surfaceViewRenderer = convertView.findViewById(R.id.surface_view); surfaceViewRenderer = convertView.findViewById(R.id.surface_view);
} }
ProgressBar progressBar = convertView.findViewById(R.id.participant_progress_bar);
if (!participantDisplayItem.isConnected()) {
progressBar.setVisibility(View.VISIBLE);
} else {
progressBar.setVisibility(View.GONE);
}
ViewGroup.LayoutParams layoutParams = convertView.getLayoutParams(); ViewGroup.LayoutParams layoutParams = convertView.getLayoutParams();
layoutParams.height = scaleGridViewItemHeight(); layoutParams.height = scaleGridViewItemHeight();
convertView.setLayoutParams(layoutParams); convertView.setLayoutParams(layoutParams);

View file

@ -71,4 +71,11 @@
android:visibility="invisible" android:visibility="invisible"
tools:visibility="visible" /> tools:visibility="visible" />
<ProgressBar
android:id="@+id/participant_progress_bar"
style="?android:attr/progressBarStyle"
android:layout_width="@dimen/call_participant_progress_bar_size"
android:layout_height="@dimen/call_participant_progress_bar_size"
android:layout_centerInParent="@bool/value_true" />
</RelativeLayout> </RelativeLayout>

View file

@ -66,6 +66,7 @@
<dimen name="call_grid_item_min_height">180dp</dimen> <dimen name="call_grid_item_min_height">180dp</dimen>
<dimen name="call_controls_height">110dp</dimen> <dimen name="call_controls_height">110dp</dimen>
<dimen name="call_participant_progress_bar_size">48dp</dimen>
<dimen name="zero">0dp</dimen> <dimen name="zero">0dp</dimen>
<dimen name="online_status_item_height">52dp</dimen> <dimen name="online_status_item_height">52dp</dimen>