标题:新手想请教一下,我写的这个在 XML 里怎么 layout 显示不出来,是我布局有问 ...
只看楼主
鬼才!
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2013-10-21
结帖率:25%
已结贴  问题点数:13 回复次数:1 
新手想请教一下,我写的这个在 XML 里怎么 layout 显示不出来,是我布局有问题吗,但是如果只有一个用户名和注册密码编辑框可以显示,多了下面的编辑框就显示
<?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>
搜索更多相关主题的帖子: 用户名 version vertical android background 
2014-09-25 20:50
一个小菜鸡
Rank: 2
等 级:论坛游民
帖 子:3
专家分:23
注 册:2014-7-31
得分: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" >------》应该是/>
2014-09-28 21:13



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-436568-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.080726 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved