display participants via flexbox layout

This commit is contained in:
AndyScherzinger 2017-12-27 15:26:13 +01:00
parent 9f80e846cd
commit e70751d945
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
3 changed files with 10 additions and 12 deletions

View File

@ -141,6 +141,8 @@ dependencies {
implementation 'com.github.Kennyc1012:BottomSheet:2.4.0'
implementation 'com.google.android:flexbox:0.3.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation ('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'

View File

@ -51,6 +51,7 @@ import android.widget.TextView;
import com.bluelinelabs.logansquare.LoganSquare;
import com.evernote.android.job.JobRequest;
import com.evernote.android.job.util.Device;
import com.google.android.flexbox.FlexboxLayout;
import com.nextcloud.talk.R;
import com.nextcloud.talk.api.NcApi;
import com.nextcloud.talk.api.helpers.api.ApiHelper;
@ -147,7 +148,7 @@ public class CallActivity extends AppCompatActivity {
@BindView(R.id.relative_layout)
RelativeLayout relativeLayout;
@BindView(R.id.remote_renderers_layout)
LinearLayout remoteRenderersLayout;
FlexboxLayout remoteRenderersLayout;
@BindView(R.id.call_controls)
RelativeLayout callControls;
@ -1217,14 +1218,6 @@ public class CallActivity extends AppCompatActivity {
@Override
public void onConfigurationChanged(Configuration newConfig) {
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
remoteRenderersLayout.setOrientation(LinearLayout.HORIZONTAL);
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
remoteRenderersLayout.setOrientation(LinearLayout.VERTICAL);
}
super.onConfigurationChanged(newConfig);
}

View File

@ -21,20 +21,23 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/relative_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".activities.CallActivity">
<LinearLayout
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/remote_renderers_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="#000000"
android:orientation="vertical">
</LinearLayout>
android:visibility="invisible"
app:flexWrap="wrap"
app:alignItems="flex_end"
app:alignContent="flex_end"/>
<org.webrtc.SurfaceViewRenderer
android:id="@+id/pip_video_view"