【发布时间】:2011-09-27 20:50:47
【问题描述】:
我坚持让这个工作。
看下面的图片,我想把气泡放在图片下面。
当然希望能够将视图放置在我喜欢的任何地方。
我认为问题出在父视图中,因此我将父 xml 添加到 .
也许我需要将 RelativeLayout 更改为其他内容,
我尝试了很多东西,但没有任何效果
.
这是我的气泡 xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@+id/frameLayout_balloon_gallery_activity_send"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/imv_balloon_gallery_activity_send"
android:src="@drawable/balloon_gallery"
android:scaleType="fitCenter"
android:layout_height="fill_parent"
android:layout_width="fill_parent"/>
</FrameLayout >
这是我将气泡插入的父级 .
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/relativelayout_main_activity_back"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery_activity_back"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spacing="2dip"
android:gravity="top"
android:paddingTop="20dip"
/>
<RelativeLayout
android:id="@+id/relativeLayoutinner_activity_back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<EditText
android:id="@+id/etx_addtext_activity_back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:text="@string/string_enter_text_here"
/>
</RelativeLayout>
</RelativeLayout>
【问题讨论】:
标签: android android-relativelayout custom-view