博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Android布局学习——线性布局和相对布局混合使用

Posted on 2011-06-07 11:36  追梦人2017  阅读(2005)  评论(0编辑  收藏  举报
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation
="vertical" android:layout_width="fill_parent"
    android:layout_height
="fill_parent">
    
<RelativeLayout android:layout_width="fill_parent"
        android:layout_height
="wrap_content">
        
<Button android:id="@+id/BtnGo" android:layout_width="wrap_content"
            android:layout_height
="wrap_content" android:layout_alignParentRight="true"
            android:text
="Go"></Button>        
        
<EditText android:id="@+id/TextUrl" android:layout_width="fill_parent"
            android:layout_height
="wrap_content" android:hint="请输入网址"
            android:layout_alignTop
="@id/BtnGo" android:layout_toLeftOf="@id/BtnGo"></EditText>
    
</RelativeLayout>
    
<WebView android:id="@+id/WebView01" android:layout_width="fill_parent"
        android:layout_height
="fill_parent">        
    
</WebView>
</LinearLayout>