私は画面の下半分を占めるScrollViewを持っています。 このScrollViewの内部には、多くのコンテンツを含むLinearLayout(垂直)を配置します。 アクティビティを開始すると、コンテンツが自動的にスクロールしてウィンドウの上部から開始されます。しかし、私はそれをScrollViewの上部(ウィンドウの中央)から始める必要があります。 私は何が間違っていますか?あなたは以下のように行うことができます ScrollView内のLinearLayoutが下に自動スクロールされます
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="ru.intrigue.activities.EditActivity"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="250dp"
android:visibility="visible">
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollView2"
android:background="@color/colorDarkBack">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<!-- content -->
</LinearLayout>
</ScrollView>
</LinearLayout>
のベストは同様に – SMR
あなたは 'ScrollViewを設定しているどのように関連するコードを投稿
:いつオープンコードの下にあなたの活動コール
あなたの画面の半分を占有する? – SlashG
あなたのXMLをここに入れてください –