2017-04-11 30 views
0

TextInputLayout에 힌트의 텍스트 크기를 늘리려고하고 EditText에 포커스가 있습니다. 그러나 같은 일을하는 방법을 알아낼 수는 없습니다.TextInputLayout 포커스가있는 텍스트 크기를 늘리십시오.

<android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="@dimen/component_margin" 
      > 
       <EditText 
        android:id="@+id/firstName" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:hint="@string/prompt_first_name" 
        android:maxLines="1" 
        android:textSize="@dimen/normal_text" 
        android:maxLength="25" 
        android:theme="@style/EditTextTheme" 
        /> 
</android.support.design.widget.TextInputLayout> 

dimens.xml

<dimen name="normal_text">14sp</dimen> 

styles.xml 내가 큰 화면 장치에 대한 이미지와 같이 이메일의 크기를 증가 할

<style name="EditTextTheme"> 
     <item name="colorControlNormal">@color/colorPrimary</item> 
     <item name="android:labelTextSize">@dimen/input_text_size</item> 
</style> 

. 암호 마찬가지로

enter image description here

enter image description here

+0

시도'안드로이드를 잘 사용 : textAppearance = "@ 스타일/Base.TextAppearance.AppCompat.Medium" ' – Nilabja

+0

는 대 중, 이것을 시도. 그러나 결과물에는 아무런 영향이 없었다. – Stallion

답변

1

당신은 TextInputLayout의 기본 hintTextAppearance을 사용할 수 있습니다. 나를 위해 XML이 추가

<android.support.design.widget.TextInputLayout 
     android:id="@+id/input_Email" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/ivLogoLogin" 
     app:hintTextAppearance="@style/TextAppearance.AppCompat.Medium"> 
0

이 당신의 스타일에 추가 한 후

<style name="InputTextLabel" parent="TextAppearance.Design.Hint"> 
    <item name="android:textSize">16sp</item> 
</style> 

과 레이아웃 파일에 TextInputLayout은 다음과 같아야합니다

<android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      app:hintTextAppearance="@style/InputTextLabel" 
      android:minHeight="30dp"> 
+0

시도했지만, 그다지 효과가 없었습니다. 출력은 같습니다. 내 활동 테마는