这是重叠的。我该如何解决?

时间:2011-07-12 05:41:31

标签: android xml

<?xml version="1.0" encoding="utf-8"?>         
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
                            android:layout_width="wrap_content" 
                            android:layout_height="250px"              
                            android:id="@+id/dialog_layout_root">
   <AbsoluteLayout
   android:layout_width="wrap_content" 
   android:layout_height="wrap_content">                         
                       <TextView android:id="@+id/dialogtext"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:textColor="#FFF"
                 android:text="This is sample text view!">
                 </TextView>
   </AbsoluteLayout>
   <AbsoluteLayout
   android:layout_width="wrap_content" 
   android:layout_height="wrap_content">

                 <EditText android:id="@+id/dialogEditText"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content">
                 </EditText>

   </AbsoluteLayout>

1 个答案:

答案 0 :(得分:2)

为什么使用AbsoluteLayout

是否有一些特殊原因?

AbsoluteLayout已弃用。您可以改为使用RelativeLayoutlinearLayout