Android ScrollView中的ConstraintLayout问题
我在应用程序中有很多按钮,只想滚动按钮,但我不能只为按钮使用滚动视图,有可能吗Android ScrollView中的ConstraintLayout问题,android,android-constraintlayout,android-scrollview,Android,Android Constraintlayout,Android Scrollview,我在应用程序中有很多按钮,只想滚动按钮,但我不能只为按钮使用滚动视图,有可能吗 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://sc
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.motor.MotorFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="400dp">
<VideoView
android:id="@+id/Motorvid"
android:layout_width="wrap_content"
android:layout_height="700dp"
android:layout_marginBottom="700dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
这里有许多按钮可供选择:
<Button
style="@style/AppTheme.RoundedCornerMaterialButton"
android:layout_width="0dp"
android:id="@+id/bmotor1"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="380dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="Genel Tanıtım"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="Suspicious0dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
我认为一种解决方案是将按钮放在线性布局中,并用ScrollView包装,而不是用ScrollView包装所有内容。如果我的答案不是你想要的,你能提供更多的信息吗?喜欢你所做的以及完成的结果应该如何工作的图像。然后告诉我你想做什么。需要更多详细信息。查看视频视图下的按钮