忍者ブログ
[PR]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。



2024/04/24 05:26 |
Android2.2 画面中央に置いたViewの下にViewを置けない?
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" >

	<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
		android:text="だみー" android:id="@+id/dummyTextView"
		android:layout_centerVertical="true" android:layout_centerHorizontal="true" ></TextView>

	<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content"
		android:id="@+id/dummyImageView" android:src="@drawable/dummyImage"
		android:layout_below="@+id/dummyTextView" android:layout_centerHorizontal="true" ></ImageView>

</RelativeLayout>
ってやったら、android:layout_belowがまったく効かない。
何故?

あと、
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" >

	<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
		android:text="だみー\nだみー\nだみー\nだみー\nだみー" android:id="@+id/dummyTextView" ></TextView>

	<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content"
		android:text="下寄せ" android:id="@+id/dummyTextView2"
		android:layout_alignRight="@+id/dummyTextView" android:gravity="bottom"
		></ImageView>

</RelativeLayout>
みたいに、親レイアウトに下寄せでビューを設置したいときはどうすればいいんですかね。
PR


2011/10/25 00:04 | Comments(0) | TrackBack() | Android

トラックバック

トラックバックURL:

コメント

コメントを投稿する






Vodafone絵文字 i-mode絵文字 Ezweb絵文字 (絵文字)



<<Android2.2 OnTouchListenerで手を離したのを感知する | HOME | 買ったものリスト 2011/10/23>>
忍者ブログ[PR]