次のコードをご覧ください
<ScrollView 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=".DisplayResult" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/zodiac1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/aries"
/>
<TextView
android:id="@+id/orTxt"
android:text="Or"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="@+id/zodiac2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gemini"
/>
</LinearLayout>
</ScrollView>
すべてをLinearLayout内の中央に配置する必要があります。アプリが100%完成すると、スクロールしないと一目で見ることができない情報がたくさんあるので、scrollviewを使用する必要があります。どうすればこれらのセンターを作ることができますか?助けてください!
アップデート
スクロール内の任意のレイアウトを使用します。問題はありません。しかし、私はそれらの要素が同じ順序(次々に)で中央に配置されている必要があります。