8

저는 항상 라이브러리 업데이트로 업데이트되며 이것이 결과입니다. build.gradle에서android : TextInputLayout이 자식의 DrawableRight를 숨 깁니다. EditText

(프로젝트 : XXX) :

build.gradle에서
classpath 'com.android.tools.build:gradle:2.2.0-beta1' 

(모듈 : 응용 프로그램) 아래

compile 'com.android.support:appcompat-v7:24.2.0' 
compile 'com.android.support:design:24.2.0' 

넣어 암호 필드 :

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

    <android.support.v7.widget.AppCompatEditText 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:inputType="textPassword" /> 
</android.support.design.widget.TextInputLayout> 

Taadaa ... 내 비밀번호 입력란은 다음과 같습니다 :

enter image description here

간단히 EditText으로 이동할 수도 있습니다.

그러나이 업데이트에는 몇 가지 결함이 있습니다.

문제점 : 내가 편집 텍스트에 drawableRight를두면 아무 것도 표시하지 않습니다. TextInputLayout에는 토글 기능을 사용하지 않는 속성도 있습니다. 나는 그것도 아래와 같이했지만 성공하지 못했습니다.

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

    <EditText 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:drawableRight="@drawable/ic_alarm_on_black_24dp" 
     android:inputType="textPassword" /> 
</android.support.design.widget.TextInputLayout> 

아무도 도와 줄 수 없습니까?

+0

파일 버그 –

+2

나도 같은 문제가있어 .. .drawableStart도 작동하지 않습니다. 오류 표시기도 여러 번 나타납니다 ... 나는 24.1.1 –

+0

@ JayPaulynice 네 ..로 롤백했습니다. 나는 또한 버전을 24.1.1로 롤백해야했습니다. –

답변

3

나는이 문제를 https://code.google.com/p/android/issues/detail?id=221002에보고했다.

라이브러리 버전 24.2.0에 버그가 있었지만 버전 24.2.1으로 수정되었습니다. 간단하게 다음과 같이 업데이트 : 여기 https://code.google.com/p/android/issues/entry?template=Support%20Library%20bug

compile 'com.android.support:appcompat-v7:24.2.1' 
compile 'com.android.support:design:24.2.1'