我有這樣的自定義類...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