こんにちは、私は、ページの上部にテキストとその下の画像を持つ単純なアンドロイドページを作成しようとしています。 Iveは線形レイアウトと相対レイアウトの両方を使ってみましたが、テキストの下に表示するイメージを取得できません。イメージがテキストの横にあるか、画面の右側にあるか、相対レイアウトを使用している場合は、イメージ全体が画面全体を占めます。アンドロイドで線形レイアウトを使用するときの画像のプロパティ
これを可能にする画像プロパティはありますか、可能であれば推奨されない絶対レイアウトは使用したくありません。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/gripbckgrnd" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="140dp"
android:layout_height="211dp"
android:src="@drawable/grip1" />
<TextView
android:id="@+id/textView1"
android:layout_width="356dp"
android:layout_height="wrap_content"
android:layout_marginTop="97dp"
android:gravity="center_horizontal"
android:text="@string/griptext"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
おかげLinearLayout
を使用している場合、あなたはそのように配向属性を指定することができ、事前
非常に簡単な解決、ありがとう、 – user1161118
あなたは大歓迎です:) – Jave