TextInputLayoutと2つのimageViewをリニアレイアウトで水平方向に揃えようとしています。何らかの理由で、私は水平レイアウトで配置するのが難しいです。これはこれまで私が試したことです。TextInputLayoutと2つのイメージビューが水平レイアウトになっています
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3.0">
<android.support.design.widget.TextInputLayout
android:id="@+id/longDescriptionTextInputLayout"
style="@style/textfieldbox"
app:hintTextAppearance="@style/TextAppearence.App.TextInputLayout"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
<android.support.design.widget.TextInputEditText
android:id="@+id/longDescriptionTextInputEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@null"
android:layout_weight="1"
android:drawablePadding="15dp"
android:textColor="@color/textInputEditTextColor"
android:drawableStart="@drawable/ic_attach_file_black_24dp"
android:drawableTint="@color/Gallery"
android:hint="@string/longDesc"
android:inputType="textEmailAddress"
tools:ignore="MissingPrefix,UnusedAttribute" />
</android.support.design.widget.TextInputLayout>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:src="@drawable/ic_mic_black_24dp" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:src="@drawable/ic_volume_up_black_48dp"/>
</LinearLayout>
私が間違っていることを理解できません。どんな助けもありがとうございます。出力画像を添付する。先頭の空白はTextInputEditTextです。
Textinputの幅を変更するとどうなりますか? –
@BrunoFerreira - EditTextは幅全体を占有します。 –
幅25dpの例を設定している場合は? –