レイアウトは以下のとおりです。
<ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:orientation="vertical" > <View android:layout_width="match_parent" android:layout_height="1000dp" android:background="@android:color/white" /> <VideoView android:id="@+id/VideoView1" android:layout_width="match_parent" android:layout_height="100dp" /> <View android:layout_width="match_parent" android:layout_height="1000dp" android:background="@android:color/white" /> </LinearLayout> </ScrollView>
以下のようにLinearLayoutの下にrequestFocus付きのTextViewを入れてみましたが、
ScrollView内のVideoViewが表示される位置まで画面が移動してしまう状態は変わらずでした。
<ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:orientation="vertical" > <TextView android:id="@+id/text01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" > <requestFocus/> </TextView>
これを解決する方法ありませんでしょうか?
あなたの回答
tips
プレビュー