Method and device for emptying text content on Android system, and terminal device
An Android system, clearing technology, applied in the direction of program control device, data processing input/output process, instrument, etc., can solve the problems of disordered layout, complex and cumbersome control layout, etc., and achieve the effect of simplifying and cumbersome
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] Embodiment 1 of the present application provides a device for clearing text content on an Android system.
[0035] figure 1 It is a schematic diagram of the composition of the device for clearing text content on the Android system according to Embodiment 1 of the present application, such as figure 1 As shown, the device 100 includes: a display unit 101 , a listening unit 102 and a clearing unit 103 .
[0036] Wherein, the display unit 101 uses the editable text control in the Android system to create a drawable object (drawable), and displays the clear button through the drawable object (for example, realized through drawableRight or drawableLeft attributes); the monitoring unit 102 monitors the corresponding area of the drawable object screen touch event; the clearing unit 103 clears the text content in the editable text control according to the monitoring result of the monitoring unit 102 .
[0037] In the embodiment of the present application, the display unit 1...
Embodiment 2
[0051] Embodiment 2 of the present application provides a device for clearing text content on an Android system. On the basis of embodiment 1, the present application is further described.
[0052] Figure 4 It is a schematic diagram of the composition of the device for clearing text content on the Android system according to Embodiment 2 of the present application, such as Figure 4 As shown, the apparatus 400 includes: a first judging unit 401 , a display unit 402 , a monitoring unit 403 and a clearing unit 404 .
[0053] Wherein, the first judging unit 401 may use the pre-drawn object of the editable text control (for example, implemented through the onPreDraw attribute), and judge whether to display the clear button according to the current text box of the editable text control. For example, in this embodiment, the pre-drawing object can be realized through the onPreDraw attribute, wherein the clear button is displayed when the current text box is not empty. The display...
Embodiment 3
[0061] Embodiment 3 of the present application provides a method for clearing text content on an Android system, which corresponds to the device in Embodiment 1, and the same content will not be described again.
[0062] Figure 5 It is a flow chart of the method for clearing text content on the Android system according to Embodiment 3 of the present application, such as Figure 5 As shown, the method includes:
[0063] Step 501, create a drawable object in the editable text control, and use the drawable object to display a clear button;
[0064] Step 502, monitor the screen touch event of the area corresponding to the drawable object;
[0065] Step 503, emptying the text content in the editable text control according to the monitoring result.
[0066] In step 501, the drawable object can be realized through the drawableRight property.
[0067] In step 501 , the displayed clear button may be located at a right-centered and vertically centered position within the editable t...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 