您好,欢迎访问成都祈钰瑶科技有限公司!

全国咨询热线

18982081108
✕

成都网站建设公司,成都网站UI设计,成都网站安全维护,成都网站内容优化服务

Android相对布局简单编程-创新互联

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    xmlns:tools="http://schemas.android.com/tools"  
    android:layout_width="match_parent"  
    android:layout_height="match_parent">  
  
    <TextView   
        android:id="@+id/tv_name"  
        android:layout_marginLeft="20dp"  
        android:layout_marginTop="40dp"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:text="姓名:"  
        />  
    <EditText  
        android:id="@+id/ed_name"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:layout_alignBaseline="@+id/tv_name"  
        android:layout_alignBottom="@+id/tv_name"  
        android:layout_toRightOf="@+id/tv_name"  
        android:ems="10"  
        android:hint="请输入您的姓名" >  
        <requestFocus />  
    </EditText>  
      
    <TextView   
        android:id="@+id/tv_sex"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:layout_below="@id/ed_name"  
        android:layout_alignLeft="@id/tv_name"  
        android:layout_marginTop="30dp"  
        android:text="性别:"  
        />  
  
    <EditText  
        android:id="@+id/ed_sex"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:layout_alignBaseline="@+id/tv_sex"  
        android:layout_alignBottom="@+id/tv_sex"  
        android:layout_alignLeft="@+id/ed_name"  
        android:ems="10"  
        android:hint="请输入您的性别" />  
      
    <TextView   
        android:id="@+id/tv_motto"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:layout_below="@id/tv_sex"  
        android:layout_alignLeft="@id/tv_sex"  
        android:layout_marginTop="30dp"  
        android:text="座右铭:"  
        />  
  
    <EditText  
        android:id="@+id/ed_motto"  
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content"  
        android:layout_alignBaseline="@+id/tv_motto"  
        android:layout_alignBottom="@+id/tv_motto"  
        android:layout_alignLeft="@+id/ed_sex"  
        android:ems="10"  
        android:hint="请输入您的座右铭" />  
      
    <LinearLayout   
        android:id="@+id/linear"  
        android:layout_width="match_parent"  
        android:layout_height="wrap_content"  
        android:orientation="horizontal"  
        android:layout_below="@id/tv_motto"  
        android:layout_marginTop="30dp"  
        >  
        <Button   
            android:id="@+id/btn_determine"  
            android:layout_width="0dp"  
            android:layout_weight="1"  
            android:layout_height="wrap_content"  
            android:text="确定"  
            />     
        <Button   
            android:id="@+id/btn_cancel"  
            android:layout_width="0dp"  
            android:layout_weight="1"  
            android:layout_height="wrap_content"  
            android:text="取消"  
            />  
    </LinearLayout>  
      
    <TextView   
        android:id="@+id/tv_show"  
        android:layout_width="match_parent"  
        android:layout_height="wrap_content"  
        android:layout_below="@id/linear"  
        android:layout_marginTop="30dp"  
        />  
</RelativeLayout>  


详细讲解:http://v.youku.com/v_show/id_XNzMwNzc4OTE2.html

创新互联长期为上千客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为隆昌企业提供专业的成都网站制作、成都网站建设,隆昌网站改版等技术服务。拥有十多年丰富建站经验和众多成功案例,为您定制开发。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。