私は、これらのビューのすべてが異なる左パディングを持っていることを私は知っています。素材編集テキスト、テキストビュー、チェックボックスなどを整列する
どうすれば修正できますか?この問題を解決するためのクールな方法はありますか?
edittextsの場合は2dp、textviewsの場合は4dpのような追加のパディングを追加しようとしましたが、異なるデバイスの異なるパディングのために動作しないようです。
例(Googleの公式アプリケーションではこれはそうではありません): 私のレイアウトには特別なものはありません。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dip">
<EditText
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/network_password"
android:inputType="textPassword"/>
</android.support.design.widget.TextInputLayout>
<CheckBox
android:id="@+id/checkbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_password"/>
</LinearLayout>
レイアウトを共有してください。 –