2011-02-13 11 views
0

私はブラウザアプリケーションを作成しようとしていますが、今はレイアウトを作成しようとしています - これは基本的にはEditText(アドレスバーとして)、WebViewと下。私は下のバーを表示することはできません問題。ここに私ですmain.xmlAndroid:xmlレイアウトの問題

<?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" > 

    <EditText 
      android:id="@+id/addressbar" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:background="@android:drawable/editbox_background" /> 

    <com.android.ibrowser.myWebView 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:id="@+id/browser" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" /> 

     <View xmlns:android="http://schemas.android.com/apk/res/android" 
      android:id="@+id/downBar" 
      android:layout_width="fill_parent" 
      android:layout_height = "60px" /> 
</LinearLayout> 

あなたはどう思いますか?

答えて

0

あなたのWebViewが"1"に属性layout_weightセットを有し、下部にあなたのバーが

+0

おかげで、それが働いていた男に表示されます作る...しかし、あなたはlayout_weightレイアウトをどのように影響するかを説明できますか?ありがとう。 – Alex1987

+0

複数のレイアウト要素の高さまたは幅が 'fill_parent'に設定されている場合、' layout_weight'が使用されます。この要素を使用するもう1つの例は、幅(高さ)が 'fill_parent'に設定された要素の後ろの要素を持ち、スクリーンから次の要素を取り除くことです。 'layout_weight'を使うと、画面から独立した要素のサイズを簡単に管理できます。 –