注册 登录
编程论坛 Android开发

新手想请教一下,我写的这个在 XML 里怎么 layout 显示不出来,是我布局有问题吗,但是如果只有一个用户名和注册密码编辑框可以显示,多了下面的编辑框就显示

鬼才! 发布于 2014-09-25 20:50, 3476 次点击
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
   
    <RelativeLayout
         android:layout_width="match_parent"
            android:layout_height="40dip"
         android:background="#eee8ec">
        
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <!-- 注册界面返回按钮 -->
            <ImageButton
                android:id="@+id/image_btn_lback"
                android:layout_width="40dp"
                android:layout_height="wrap_content"
                android:src="@drawable/return_back"/>
            
            <ImageView
                 android:layout_width="5dp"
                android:layout_height="52dp"
                android:layout_marginLeft="-2dp"
                android:src="@drawable/title_04"/>
            
        </LinearLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="14dp"
            android:layout_marginLeft="55dp"
            android:textColor="#2188b3"
            android:textSize="20sp"
            android:text="@string/register" />
     </RelativeLayout>
   
     <TextView
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="10dp"
         android:textSize="15sp"
         android:text="@string/register_name" />

         <!-- 用户名编辑框 -->
         <EditText
             android:layout_width="300dip"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
             android:hint="@string/register_name_circle"
             android:scrollHorizontally="true"
             android:singleLine="true"
             android:ems="10" />
            
          <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:layout_marginLeft="10dp"
            android:textSize="15sp"
            android:text="@string/set_password" />
        
        <!-- 设置密码编辑框 -->
         <EditText
             android:layout_width="300dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:hint="@string/password"
             android:scrollHorizontally="true"
            android:singleLine="true"
            android:password="true"
            android:maxLength="24"
            android:ems="10" >
      
         <TextView
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="10dp"
         android:textSize="15sp"
         android:text="@string/affirm_password" />
   
         <!-- 确认密码编辑框 -->
         <EditText
             android:layout_width="300dip"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
             android:hint="@string/password"
             android:scrollHorizontally="true"
             android:singleLine="true"
             android:ems="10" />
         
         
         <TextView
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="10dp"
         android:textSize="15sp"
         android:text="@string/mailbox" />

         <!-- 邮箱地址编辑框 -->
         <EditText
             android:layout_width="300dip"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
             android:hint="@string/mailbox_circle"
             android:scrollHorizontally="true"
             android:singleLine="true"
             android:ems="10" />
         
         <TextView
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="10dp"
         android:textSize="15sp"
         android:text="@string/verification_code" />

         <!-- 验证码编辑框 -->
         <EditText
             android:layout_width="300dip"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
             android:hint="@string/verification_code_circle"
             android:scrollHorizontally="true"
             android:singleLine="true"
             android:ems="10" />
         
         

                 <requestFocus />
             </EditText>
         
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="40dip"
             android:layout_marginTop="20dp" >
            

            

         </RelativeLayout>
         
         
         
</LinearLayout>
1 回复
#2
一个小菜鸡2014-09-28 21:13
<!-- 设置密码编辑框 -->
         <EditText
             android:layout_width="300dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:hint="@string/password"
             android:scrollHorizontally="true"
            android:singleLine="true"
            android:password="true"
            android:maxLength="24"
            android:ems="10" >------》应该是/>
1