Android Studio Phase 53rd-Custom EditText password keyboard

Source: Internet
Author: User

The code has been sorted out, and the effect is as follows:

Code

        //set input to password mode          Inputetp1.setinputtype (Inputtype.type_class_number | editorinfo.type_number_variation_password);         inputetp1.setdrawablerightlistener (new  Edittextpassword.drawablerightlistener ()  {              @Override             public void  ondrawablerightclick ()  {                 //can also be used to achieve other effects, such as one-click emptying                  if  (MISSHOW1)  {                      Inputetp1.setcompounddrawableswithintrinsicbounds (0, 0, r.drawable.eye_grey, 0);                     inputetp1.setinputtype (Inputtype.type_class_number | editorinfo.type_number_ Variation_password);                 } else {                     inputetp1.setcompounddrawableswithintrinsicbounds (0, 0,  r.drawable.eye_orange, 0);//                     inputetp.setinputtype (Inputtype.type_text_variation_visible_ PASSWORD);                     inputetp1.setinputtype (Inputtype.type_class_number | editorinfo.type_number_ Variation_normal);                 }                 mIsShow1 = !mIsShow1;             }         });

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/06/8B/wKiom1m59KeDzXOLAACbVGiWoZ4113.png "title=" Qq20170914111544.png "alt=" Wkiom1m59kedzxolaacbvgiwoz4113.png "/>

Address: Https://github.com/geeklx/MyApplication/tree/master/p039_edittextpwd


This article is from the "Liangxiao Technology Center" blog, please be sure to keep this source http://liangxiao.blog.51cto.com/3626612/1965175

Android Studio Phase 53rd-Custom EditText password keyboard

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.