2016-11-19 2 views
0

사용자 이름 입력을 표시하는 데 벨로우즈 코드를 사용하고 있습니다. EditText가 제대로 작동하지만 오른쪽 디스플레이 아이콘이 보이지 않습니다.TextInputEditText에 drawableRight 아이콘이 표시되지 않습니다.

<android.support.design.widget.TextInputLayout 
     android:id="@+id/login_screen_edit_text_username_wrapper" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 
     <android.support.design.widget.TextInputEditText 
      android:id="@+id/login_screen_edit_text_username" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:hint="@string/label_username" 
      android:inputType="text" 
      android:drawableRight="@mipmap/email_icon" 
      android:text="[email protected]" 
      /> 
    </android.support.design.widget.TextInputLayout> 

Nexus6p android 버전 6.0에서이 코드를 테스트하고 있습니다. 부모 레이아웃은 LinearLayout입니다. 누군가 동일한 문제에 직면하고 수정해야하는 경우 업데이트하십시오.

+1

android:drawableEnd="@mipmap/email_icon" 

사용

. 당신은 그것의 상대 버전을 설정해야합니다; 예 : 'drawableEnd'. –

+1

android : drawableEnd = "@ mipmap/email_icon"오른쪽 아이콘을 추가해 주셔서 감사합니다. – Swapnil

답변

3

대신 그들은 최근에 설계 지원 라이브러리에서 무언가를 부러

android:drawableRight="@mipmap/email_icon" 
관련 문제