2016-06-14 3 views
0

활성화 화면 만있는 샘플 앱을 개발 중입니다. 하나는 EditText이고 하나는 Button입니다.Android 4.4 (Kitkat)의 EditText 높이 문제

안드로이드 버전을 제외한 모든 안드로이드 버전 화면이 괜찮아 보입니다.

Kitkat 버전에서만 EditText과 관련하여 문제가 발생합니다. EditText 완벽한 높이가 보이지 않고 주위에 그림자가 보임 EditText.

자세한 내용은 아래 이미지를 참조하십시오.

In Other Android version

In Android 4.4 version

다음은 레이아웃 XML 파일에 EditText 코드입니다.

<android.support.design.widget.TextInputLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content"> 

       <EditText 
        android:id="@+id/edt_activation_key" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:ems="10" 
        android:gravity="center" 
        android:hint="Activation Number" 
        android:maxLines="1" 
        android:textColor="#575757" 
        android:textSize="15dp" /> 

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

어떻게이 문제를 android 4.4에 맞출 수 있습니까? Google에서도 검색했지만이 문제에 대한 정확한 해결책을 찾지 못했습니다.

+0

후 귀하의 질문에 –

+0

@Milind Vyas는 더 많은 이해를위한 몇 가지 코드를 편집. 사실 나는 질문을 게시하는 동안 코드를 넣는 것을 잊었습니다. btw 업데이트 된 질문을 확인하십시오. –

+0

이제 Textinput 레이아웃이 제거되고 4.4에서 실행됩니다. –

답변

0

동일한 문제가있었습니다. EditText 대신 android.support.design.widget.TextInputEditText을 사용하십시오. 이로 인해이 문제가 해결되었습니다. 기억 고맙습니다 : 코드

<android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <android.support.design.widget.TextInputEditText 
       android:id="@+id/edt_activation_key" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:ems="10" 
       android:gravity="center" 
       android:hint="Activation Number" 
       android:maxLines="1" 
       android:textColor="#575757" 
       android:textSize="15dp" /> 

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