add buttons to insert values to playlist
This commit is contained in:
parent
8f78d72a13
commit
99b79816f0
|
@ -75,6 +75,18 @@ class MainActivity : AppCompatActivity() {
|
||||||
newPlayer.playStream("portrait", PlayMode.EMBEDDED_VIDEO)
|
newPlayer.playStream("portrait", PlayMode.EMBEDDED_VIDEO)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.add6502StreamButton.setOnClickListener {
|
||||||
|
newPlayer.addToPlaylist("6502")
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.addImuStreamButton.setOnClickListener {
|
||||||
|
newPlayer.addToPlaylist("imu")
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.addPortraitStreamButton.setOnClickListener {
|
||||||
|
newPlayer.addToPlaylist("portrait")
|
||||||
|
}
|
||||||
|
|
||||||
videoPlayerViewModel.newPlayer = newPlayer
|
videoPlayerViewModel.newPlayer = newPlayer
|
||||||
videoPlayerViewModel.contentFitMode = ContentScale.FIT_INSIDE
|
videoPlayerViewModel.contentFitMode = ContentScale.FIT_INSIDE
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,7 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/buttons_layout"
|
android:id="@+id/buttons_layout"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -74,6 +73,12 @@
|
||||||
app:layout_constraintStart_toEndOf="@id/embedded_player_layout"
|
app:layout_constraintStart_toEndOf="@id/embedded_player_layout"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/start_6502_stream_button"
|
android:id="@+id/start_6502_stream_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -93,9 +98,33 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:text="Start Landscape Stream" />
|
android:text="Start Portrait Stream" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_6502_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"
|
||||||
|
android:text="Append 6502 Stream" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_imu_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"
|
||||||
|
android:text="Append IMU Stream" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_portrait_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"
|
||||||
|
android:text="Append Portrait Stream" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!-- NewPlayer
|
||||||
<!-- NewPlayer
|
|
||||||
|
|
||||||
@author Christian Schabesberger
|
@author Christian Schabesberger
|
||||||
|
|
||||||
|
@ -33,8 +32,8 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:minHeight="50dp"
|
android:minHeight="50dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
@ -63,17 +62,22 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<ScrollView
|
||||||
android:id="@id/buttons_layout"
|
android:id="@id/buttons_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/embedded_player_layout"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/embedded_player_layout"
|
||||||
app:layout_constraintVertical_weight="1">
|
app:layout_constraintVertical_weight="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/start_6502_stream_button"
|
android:id="@+id/start_6502_stream_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -93,9 +97,35 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:text="Start Landscape Stream" />
|
android:text="Start Portrait Stream" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_6502_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="Append 6502 Stream"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_imu_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="Append IMU Stream"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_portrait_stream_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="Append Portrait Stream"
|
||||||
|
android:backgroundTint="@color/material_dynamic_primary50"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue