[*] 复用factory
This commit is contained in:
@@ -179,7 +179,7 @@ public class MainActivity extends AppCompatActivity implements Serializable {
|
||||
}
|
||||
this.threadHandler.post(() -> {
|
||||
// 进入房间
|
||||
Taoyao.taoyao.roomEnter("1e6707a5-6846-405e-95de-632aa01569aa", null);
|
||||
Taoyao.taoyao.roomEnter("91f81c0a-0556-4087-b9a4-5889fac36fb6", null);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -244,8 +244,8 @@ public class MainActivity extends AppCompatActivity implements Serializable {
|
||||
private void previewVideo(Message message) {
|
||||
final GridLayout video = this.binding.video;
|
||||
final int count = video.getChildCount();
|
||||
final GridLayout.Spec rowSpec = GridLayout.spec(count / 2, 1, 0);
|
||||
final GridLayout.Spec columnSpec = GridLayout.spec(count % 2, 1, 0);
|
||||
final GridLayout.Spec rowSpec = GridLayout.spec(count / 2, 1.0F);
|
||||
final GridLayout.Spec columnSpec = GridLayout.spec(count % 2, 1.0F);
|
||||
GridLayout.LayoutParams layoutParams = new GridLayout.LayoutParams(rowSpec, columnSpec);
|
||||
layoutParams.width = 0;
|
||||
layoutParams.height = 0;
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
android:id="@+id/video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2" />
|
||||
android:columnCount="2">
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/settings"
|
||||
|
||||
Reference in New Issue
Block a user