1

Есть ли способ добавить отступы для подсказки, когда вы нажимаете eddittext? Я попытался добавить отступы и поля как в edittext, так и в TextInputLayout.Слишком высокий уровень подсказки TextInputLayout

В настоящее время:

<android.support.design.widget.TextInputLayout 
      android:id="@+id/login_layout_email" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginBottom="12dp" 
      android:layout_marginEnd="36dp" 
      android:layout_marginStart="36dp" 
      android:background="@color/color_line_transparent" 
      android:gravity="center" 
      android:paddingEnd="16dp" 
      android:paddingStart="16dp" 
      android:theme="@style/TextLabel" 
      app:errorTextAppearance="@style/TextAppearance.Design.Error"> 

      <EditText 
       android:id="@+id/login_input_email" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_gravity="center" 
       android:hint="@string/hint_email" 
       android:inputType="textEmailAddress" 
       android:textColor="@color/color_text_login" 
       android:textSize="14sp" /> 

     </android.support.design.widget.TextInputLayout> 

PRINTSCREEN Printscreen On Click

ответ

1

Я не пробовал, так что я не уверен, если это работает, но есть вы пытались добавить дополнение к родительскому макету, который обертывает TextInputLayout?

Похоже, что ваш TextInputLayout имеет стандартную/стандартную пометку подсказки. Поэтому, возможно, вам стоит попытаться сделать родительскую учетную запись макета большим расстоянием между подсказкой TextInputLayout и ViewTextText.

Я написал быструю почту на TextInputLayouts здесь, который может иметь еще несколько советов, которые могут помочь вам ?: w3bshark.com/blog/input-layouts

+0

Я сделал, как вы сказали. Я добавил RealtiveLayout, и теперь у меня есть только эти элементы. Каждое дополнение, поле, которое я дал ему в Relative Layout, теперь работает. Жаль, вы не можете просто добавить отступы. – WinterChilly

0

Использование обивка в EditText

<android.support.design.widget.TextInputLayout 
     android:id="@+id/login_layout_email" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginBottom="12dp" 
     android:layout_marginEnd="36dp" 
     android:layout_marginStart="36dp" 
     android:background="@color/color_line_transparent" 
     android:gravity="center" 
     android:theme="@style/TextLabel" 
     app:errorTextAppearance="@style/TextAppearance.Design.Error"> 

     <EditText 
      android:id="@+id/login_input_email" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:paddingEnd="16dp" 
      android:paddingStart="16dp" 
      android:layout_gravity="center" 
      android:hint="@string/hint_email" 
      android:inputType="textEmailAddress" 
      android:textColor="@color/color_text_login" 
      android:textSize="14sp" /> 

    </android.support.design.widget.TextInputLayout> 
+0

все тот же результат. – WinterChilly

Смежные вопросы