У меня есть TextInputEditText внутри TextInputLayout на ConstraintLayout.
Я хочу установить paddingLeft в текст редактирования, но это не работает. Если я перехожу на paddingStart, он работает нормально, но мне нужно paddingLeft:
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/phoneNumberHolder"
android:layout_width="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="16dp"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputPhoneNumber"
app:layout_constraintTop_toTopOf="parent"
style="@style/EditText.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintAnimationEnabled="false"
app:hintEnabled="false"
app:boxStrokeColor="@color/colorBrand">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editTextPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="90dp"
android:hint="@string/edit_user_profile_phone"
android:layout_gravity="start"
android:textAlignment="viewStart"
android:inputType="phone" />
</com.google.android.material.textfield.TextInputLayout>
And EditText.OutlinedBox is :
<style name="EditText.OutlinedBox" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="android:minHeight">56dp</item>
<item name="android:textSize">18sp</item>
<item name="android:textCursorDrawable">@null</item>
<item name="android:fontFamily">@font/nunito_regular</item>
<item name="android:textColorHint">@color/colorTextSecondary</item>
<item name="hintTextColor">@color/colorBrand</item>
<item name="hintEnabled">true</item>
</style>
Есть ли какой-нибудь трюк, чтобы сделать это? похоже проблема от Widget.MaterialComponents.TextInputLayout.OutlinedBox
android:paddingStart
иandroid:paddingLeft
, если хотите. - person Gabriele Mariotti   schedule 11.09.2019