私のアプリには、LinearLayoutに1つのEditTextとImageButtonがあります。
ImageButtonであるlayout_heightEditTextを設定したいと思います。
ImageButtonにはsrc画像があり、setlayout_heightはwrap_contentです。
EditTextのlayout_heightと同じImagebuttonのsrcにどのように設定しますか?
私のアプリには、LinearLayoutに1つのEditTextとImageButtonがあります。
ImageButtonであるlayout_heightEditTextを設定したいと思います。
ImageButtonにはsrc画像があり、setlayout_heightはwrap_contentです。
EditTextのlayout_heightと同じImagebuttonのsrcにどのように設定しますか?
配置が水平であれば解決策になります
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="10"
android:orientation="horizontal" >
<EditText
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="5"/>
<ImageButton
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="5"
android:src="@drawable/mail"/>
</LinearLayout>
何をしようとしているのかについては、線形レイアウトをlayout_widthとlayout_height "wrap_content"に設定し、ImageViewを両方ともwrap_contentに設定してから、editTextのlayout_heightをmatch_parentに設定すると、ImageViewと同じになると思います。
私の悪い私はあなたがImageViewを言ったと思った私は間違っている可能性があります