This attribute indicates whether the view is displayed. For example, Android: visibility = "gone" in relativelayout"
It has three attributes: visvisible display; invisvisible display black background entries; gone not display
In the class, you can set whether it is displayed or not, setvisibility (view. Gone); Not Displayed
Setvisibility (view. Visible); Display
Android edittext
1. onclick event of edittext
After an onclick event is added to edittext, if no focus is obtained, the first click will not respond, but the focus will be obtained. The second click will respond to onclick. There may be different solutions for unnecessary situations. Generally, onfocuschangedlistener is used, or the two are combined for event processing to achieve the expected results.
2. Hide the cursor and mask the keyboard
Setting edittext to hide the cursor may often be related to setting itNot editableUsed together. If the setting is not editable, you only need to setAndroid: editable = "false", And setInvisible cursorYou can set Android: cursorvisible = "false ".
If not, create the following method in the relevant Java class:Private void setedittextdisable () {<br/> et_name.setenabled (false); <br/> et_mobilephone.setenabled (false); <br/>}< br/>
With the hidden cursor, software disks may often be shielded. To achieve this function, you can set the inputtype parameter to type_null. However, during my experiment, I found that setting in the layout file does not work, to obtain the response component in the activity file, call setinputtype (inputtype. type_null) method.
3. Password
Edittext has an attribute: Android: password. The optional values are true and false. This attribute can mark whether the characters in the input box are replaced by dots. Note that after setting Android: Password = "true", you can press enter to enter the edittext. If you enter the press ENTER character, it will be treated as a character of the password, therefore, if such special characters are not allowed in the password, set singleline = "true ".