RelativeLayout
が完全に画面に収まるようなアプリを作っています。私はレイアウトにとsetScaleY()
を使ってこのレイアウトをズームするボタンを追加しました。結果として(明らかに)レイアウト全体がスクリーンにはもう収まりません。だから最初はScrollView
を使ってRelativeLayout
に移動できると思ったが、これはうまくいかなかった。助言がありますか?前もって感謝します。ここRelativeLayoutで移動する
がXMLコードである:
<RelativeLayout 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:id="@+id/layoutMain"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="phou.minesweeper.GameActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/chronometer"
android:layout_below="@+id/textViewBest">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true">
<RelativeLayout
android:id="@+id/grid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"></RelativeLayout>
</ScrollView>
</RelativeLayout>
</RelativeLayout>
iはズーミングだRelativeLayout
は、ID =グリッドを有するものです。 すべてのビューがJavaで作成されるため、xmlコードは非常に短いです。
私にxmlコードを見せてください。 –