A method based on a complex environment to realize the slideable and clickable switch

A complex environment, switching technology, applied in the input/output process of data processing, instruments, calculations, etc.

Active Publication Date: 2019-04-30
沈文策
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The technical problem to be solved by the present invention is to provide a method based on a complex environment to realize the slideable and clickable switch, so that the control can be perfectly applied to various simple or complex application scenarios, and there will be no stuck or even normal switch.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method based on a complex environment to realize the slideable and clickable switch
  • A method based on a complex environment to realize the slideable and clickable switch
  • A method based on a complex environment to realize the slideable and clickable switch

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] see Figure 1 to Figure 3 As shown, a method of the present invention based on a complex environment to realize the slideable and clickable switch, the method includes the following steps:

[0021] Step 1, create a switch class SuperButton in a complex environment, obtain the size occupied by the background picture of the switch class SuperButton as the size of a switch view, and draw the switch view on the screen; the step 1 is specifically: create A switch class SuperButton, the switch class SuperButton inherits the parent class View of the switch control, creates the switch object by the construction method, calls the onMeasure (int, int) method to measure the size occupied by the background picture of the switch object as the size of the switch view, and Call the onDraw(canvas) method to draw the switch view to the screen. The complex environment includes: sliding and scrolling view controls, custom controls inherited from the control ViewGroup of the container cla...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention provides a method for realizing a slidable and clickable switch based on a complex environment. The method comprises: 1, creating a switch-type Super Button in the complex environment, obtaining a size occupied by a background picture of the switch-type Super Button, using the obtained size as a size of a switch view, and drawing the switch view onto a screen; 2, after the switch view is displayed, adding a control logic of clicking and sliding to the switch view; and 3, receiving a sliding or clicking event of a finger on the switch view, and completing sliding or clicking processing of the switch. According to the method provided by the present invention, a control can be perfectly applicable to various simple or complex application scenarios, and the condition that the control is blocked and even cannot be normally turned on and off cannot be generated.

Description

technical field [0001] The invention relates to the technical field of the Android system, in particular to a method for realizing the sliding and clicking of a switch based on a complex environment. Background technique [0002] The switch of Android (Android) switch has introduced a new control Switch from 4.0 (API 14) (application programming interface), in addition to the simple ToggleButton (switch), or CheckBox (check box) or two pictures Click Toggle. But there are deficiencies in these, sliding switching cannot be realized, and there will be a problem of focus conflict when using CheckBox. Through the research on the implementation of Android native controls, it is not difficult to realize a custom clickable and slidable switch, but it should be noted that if placed in a slightly complicated environment, the original perfectly slidable and clickable switch is often There will be situations where it freezes or even cannot be switched normally. Contents of the inve...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/44G06F3/0481G06F3/0488
Inventor 沈文策
Owner 沈文策
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products