私はAndroidアプリケーションでチュートリアルを作成しようとしていますが、いくつかのUI要素の上にいくつかのバルーンを配置したいと思います。私のUIはLinearLayouts
で構築されています。LinearLayout内の要素にイメージをオーバーラップする方法
LinearLayout
の特定の位置(つまり、id = "@ id/email"のテキストフィールドの横)にフローティング画像を配置するにはどうすればよいですか。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp" >
<TextView android:id="@+id/email"
style="@style/LoginBarText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="3.0dp"
android:text="Email:" />
</LinearLayout>
要素をオーバーラップできるレイアウトは、RelativeLayoutですが、他のレイアウト内の要素に対しては機能しません。
おかげ
LinearLayoutをRelativeLayoutに変更しても問題ありません。 – bhups
%属性で画面を埋めるためにweight属性が必要なので変更できません。 WeightがRelativeLayoutsで機能しない – Matroska