2011-10-19 19 views
0

EditText(その幅に合わせて)とその横にボタンが必要です。 のEditText(fill_parent - ボタンの幅)+ボタン(wrap_content)=すべて(fill_parent)EditTextとボタンのレイアウト

私はこれをどのように行うのですか....

答えて

0
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> 
    <EditText android:layout_width="0dip" android:layout_height="wrap_content" 
     android:layout_weight="1.0"/> 
    <Button android:layout_width="wrap_content" android:layout_height="wrap_content" 
     android:text="Button"/> 
</LinearLayout> 

これは動作するはずです。

+0

これはうまくいきました!!!!!!!!!!!!!!!! – user533844

+0

よく答えとupvoteを設定します。ありがとう – blessenm

関連する問題