我有这样的自定义类...Android版:全屏幕的RelativeLayout
public class DrawView extends ImageView
当我设置DrawView
构造
内的setImageBitmap(bitmap)
的EditText
结束了ImageView
和ImageView
背后充满屏幕。
我应该如何改变我的布局来放置EditText
下ImageView
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.hasse.move.DrawView
android:id="@+id/mainView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText android:id="@+id/addtext"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_below="@+id/mainView"
android:text="aaa"
/>
</RelativeLayout>
正如你可以看到我使用android:layout_below =“@ + id/mainView”。 但仍然我的自定义ImageView类是全屏。 – Erik 2011-05-10 14:47:53
是的我的构造函数有(上下文上下文,AttributeSet集) – Erik 2011-05-10 14:48:56
两天前,我有与RelativeLayout类似的问题。我首先删除每个视图的所有属性,然后再仔细地设置它们,然后它的工作,不能解释为什么,但它的工作到最后... – Lumis 2011-05-10 14:50:47