Customize the combination of Android components create a Password box component

Source: Internet
Author: User
<span id="Label3"></p><p><p></p></p><p><p>All controls (also known as Components) in Android inherit from the Adnroid.view.View class, Android.view.ViewGroup is an important subclass of the view class, and most of the layout classes of the book inherit from the ViewGroup class.</p></p><p><p><br></p></p><p><p>Attach a view and Widget class diagram based on Android Api21</p></p><p><p></p></p><p><p>Custom Android components can basically start with 2 portals, one is to inherit the Viewe class to pick up the brush and canvas to draw the component, but rather to construct the custom component by inheriting the View's subclasses and combining the existing Components.</p></p><p><p><br></p></p><p><p>This article uses a custom Passwordview component to enable the password to be displayed by clicking on the Click-to-check box. Passwordview component classes are implemented by inheriting LinearLayout classes and combining Edittext,checkbox Components.</p></p><p><p><br></p></p><p><p>Effects such as:</p></p><p><p></p></p><p><p>650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/76/87/wKioL1ZVesqT79yLAAA9P5BWnqg110.png "style=" width : 380px;height:221px; "title=" pwd-1.png "width=" 380 "height=" 221 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1zvesqt79ylaaa9p5bwnqg110.png "/>650) this.width=650;" src= "http://s1.51cto.com/wyfs02/M02/76/87/ Wkiol1zvesrxynfzaaa870xrjqa969.png "style=" width:380px;height:184px;float:left; "title=" pwd-2.png "width=" 380 " height= "184" border= "0" hspace= "0" vspace= "0" alt= "wkiol1zvesrxynfzaaa870xrjqa969.png"/></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p>

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.