CN106371836A - Method for implementing variable operating component based on android mobile phone - Google Patents
Method for implementing variable operating component based on android mobile phone Download PDFInfo
- Publication number
- CN106371836A CN106371836A CN201610774663.8A CN201610774663A CN106371836A CN 106371836 A CN106371836 A CN 106371836A CN 201610774663 A CN201610774663 A CN 201610774663A CN 106371836 A CN106371836 A CN 106371836A
- Authority
- CN
- China
- Prior art keywords
- variable
- operating assembly
- variable operating
- mobile phone
- operating component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
Abstract
The invention provides a method for implementing a variable operating component based on an android mobile phone. The method comprises the following steps: 1, defining an initial variable of the variable operating component in an attrs.xml file; 2, constructing a component layout file; 3, implementing related java codes, including 3-1, initializing the variable operating component through java codes, 3-2, implementing the linking effect of 'variable dragging selection bar', 'variable input frame'and 'variable display part' of the variable operating component through java codes, and synchronously changing, 3-3, implementing actions of 'variable plus 1'and 'variable minus 1' buttons of the variable operating component through java codes, and 3-4, implementing the display optimization function of time variable of the variable operating component through java codes. The method has the advantages of simplicity in design, convenience and rapidness.
Description
Technical field
The invention belongs to cell phone software development field, specifically, relate to a kind of behaviour of the variable based on android mobile phone
Make the implementation method of assembly.
Background technology
Android program development platform provides necessary assembly and api, and developer can be according to the demand of oneself Lai real
The now software of oneself and assembly.Android mobile phone terminal software has multiple methods such as to directly input, drag choosing in selected variable
Select, unlike signs change numerical value etc..But every kind of method has the pros and cons of oneself, such as: directly inputting can be more accurate, but relatively more numerous
Trivial;Dragging selects relatively more directly perceived but is detrimental to finely tune, and selecting a particular value when numerical range is very big is very painful;Plus
Minus sign change numerical value is accurately and directly perceived, but elapsed time is compared in operating process.
In order to solve with present on problem, people are seeking a kind of preferable technical solution always.
Content of the invention
The purpose of the present invention is for the deficiencies in the prior art, thus providing a kind of variable based on android mobile phone
The implementation method of operating assembly, can select arbitrary mode of operation to select, to change variate-value and to optimize aobvious as needed
Show time variable.
To achieve these goals, the technical solution adopted in the present invention is: a kind of variable behaviour based on android mobile phone
Make the implementation method of assembly, comprise the following steps:
Step 1: the initializing variable of variable operating assembly defined in attrs.xml file;
Step 2: build assembly layout file;
Step 3: realize assembly layout with java code.
Based on above-mentioned, the assembly layout in described step 2 includes title division, variable display portion, variable input frame, change
The dragging selector bar of amount, the variable button that subtracts 1 and variable add 1 button.
Based on above-mentioned, the concretely comprising the following steps of described step 3:
Step 3-1, realizes the initialization procedure of variable operating assembly by java code;
Step 3-2, is realized " the dragging selector bar of variable ", " variable input frame " of variable operating assembly, " is become by java code
The linkage effect of amount display portion ", three's synchronous change;
Step 3-3, realizes the action of " variable adds 1 ", " variable subtracts 1 " button of variable operating assembly by java code;
Step 3-4, realizes the display optimization function of the time variable of variable operating assembly by java code.
Based on above-mentioned, in described step 3-1, the initialization procedure of variable operating assembly includes setting display title, setting becomes
Amount scope and setting variable unit.
Hinge structure of the present invention has prominent substantive distinguishing features and significantly improves, specifically, side of the present invention
Just user selects arbitrary mode of operation to select, to change variate-value as needed, anaplasia when simultaneously can also optimize display
Amount, convenient and swift.
Specific embodiment
Below by specific embodiment, technical scheme is described in further detail.
A kind of implementation method of the variable operating assembly based on android mobile phone, comprises the following steps:
Step 1: the initializing variable of variable operating assembly defined in attrs.xml file.
Specifically, described initializing variable includes title variable, min variable, max variable, value variable, digits change
Amount, units variable, istimer variable and isenable variable,
Described title variable is character string type, for the descriptive text of assignment component;
Described min variable is integer type, for the minimum selectable value of assignment component;
Described max variable is integer type, for the maximum selectable value of assignment component;
Described value variable is integer type, for the default initial values of assignment component;
Described digits variable is character string type, the decimal place supported for assignment component;
Described units variable is character string type, for the unit of assignment component;
Described istimer variable is boolean type, and whether its default value is fasle, be time variable for specifying variable;
When described istimer variate-value is true and described units variate-value is that s or described min variate-value is h, described istimer
Variable can specify time variable to be optimized display in time system mode, such as: 60s is shown as 1min, and 60min is shown as
1h;
Described isenable variable is boolean type, and its default value is true;When the value of described isenable variable is
During false, variable operating assembly is only able to display variate-value it is impossible to selected variable value.
Step 2: build the topology file of described operating assembly;Specifically, the layout of described assembly includes title division, change
Amount display portion, variable input frame, the dragging selector bar of variable, variable subtract 1 button and variable add 1 button.
Step 3: realize assembly layout with java code.
Specifically, the concretely comprising the following steps of described step 3:
Step 3-1, realizes the initialization procedure of variable operating assembly by java code, specifically includes setting display title, sets
Put range of variables, setting variable unit, wherein variable shows with time system, unit is the second.
Step 3-2, realizes " the dragging selector bar of variable " of variable operating assembly by java code, " variable inputs
Frame ", the linkage effect of " variable display portion ", three's synchronous change.
Step 3-3, realizes the action of " variable adds 1 ", " variable subtracts 1 " button of variable operating assembly by java code;
Step 3-4, realizes the display optimization function of the time variable of variable operating assembly by java code.
Specifically, in activity code, the code of securing component example is:
slipview slipview = (slipview) findviewbyid(r.id.slip_sdzcys);
In activity code, the call method of the value of securing component is as follows:
slipview.getvalue();
In activity code, the method for dynamic change components values is as follows:
slipview.setvalue(int value).
Finally it should be noted that: above example is only not intended to limit in order to technical scheme to be described;To the greatest extent
Pipe has been described in detail to the present invention with reference to preferred embodiment, and those of ordinary skill in the art are it is understood that still
The specific embodiment of the present invention can be modified or equivalent is carried out to some technical characteristics;Without deviating from this
The spirit of bright technical scheme, it all should be covered in the middle of the technical scheme scope that the present invention is claimed.
Claims (4)
1. a kind of implementation method of the variable operating assembly based on android mobile phone is it is characterised in that comprise the following steps:
Step 1: the initializing variable of variable operating assembly defined in attrs.xml file;
Step 2: build assembly layout file;
Step 3: realize assembly layout with java code.
2. the variable operating assembly based on android mobile phone according to claim 1 implementation method it is characterised in that:
Assembly layout in described step 2 includes title division, variable display portion, variable input frame, the dragging selector bar of variable, change
The amount button that subtracts 1 and variable add 1 button.
3. the variable operating assembly based on android mobile phone according to claim 2 implementation method it is characterised in that
The concretely comprising the following steps of described step 3:
Step 3-1, realizes the initialization procedure of variable operating assembly by java code;
Step 3-2, is realized " the dragging selector bar of variable ", " variable input frame " of variable operating assembly, " is become by java code
The linkage effect of amount display portion ", three's synchronous change;
Step 3-3, realizes the action of " variable adds 1 ", " variable subtracts 1 " button of variable operating assembly by java code;
Step 3-4, realizes the optimization display function of the time variable of variable operating assembly by java code.
4. the variable operating assembly based on android mobile phone according to claim 3 implementation method it is characterised in that:
In described step 3-1, the initialization procedure of variable operating assembly includes setting display title, setting range of variables and setting variable
Unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610774663.8A CN106371836A (en) | 2016-08-31 | 2016-08-31 | Method for implementing variable operating component based on android mobile phone |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610774663.8A CN106371836A (en) | 2016-08-31 | 2016-08-31 | Method for implementing variable operating component based on android mobile phone |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106371836A true CN106371836A (en) | 2017-02-01 |
Family
ID=57902514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610774663.8A Pending CN106371836A (en) | 2016-08-31 | 2016-08-31 | Method for implementing variable operating component based on android mobile phone |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106371836A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110069243A (en) * | 2018-10-31 | 2019-07-30 | 上海奥陶网络科技有限公司 | A kind of java program threads optimization method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102331934A (en) * | 2011-10-21 | 2012-01-25 | 广州市久邦数码科技有限公司 | Method for implementing desktop component based on GO desktop system |
CN102654833A (en) * | 2012-02-01 | 2012-09-05 | 中兴通讯(香港)有限公司 | Mobile phone application development method and system |
CN104423792A (en) * | 2013-09-10 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for changing positions of icons of touch screen terminal and mobile terminal |
-
2016
- 2016-08-31 CN CN201610774663.8A patent/CN106371836A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102331934A (en) * | 2011-10-21 | 2012-01-25 | 广州市久邦数码科技有限公司 | Method for implementing desktop component based on GO desktop system |
CN102654833A (en) * | 2012-02-01 | 2012-09-05 | 中兴通讯(香港)有限公司 | Mobile phone application development method and system |
CN104423792A (en) * | 2013-09-10 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for changing positions of icons of touch screen terminal and mobile terminal |
Non-Patent Citations (2)
Title |
---|
李宁: "《Android开发完全讲义》", 31 October 2015, 中国水利水电出版社 * |
王勇等: "《Android编程入门很简单》", 31 August 2012, 清华大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110069243A (en) * | 2018-10-31 | 2019-07-30 | 上海奥陶网络科技有限公司 | A kind of java program threads optimization method |
CN110069243B (en) * | 2018-10-31 | 2023-03-03 | 上海奥陶网络科技有限公司 | Java program thread optimization method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8776095B2 (en) | Screen locking method and mobile terminal | |
KR101819508B1 (en) | Apparatus and method for changing theme of application in portable terminal | |
CN101765236B (en) | Mobile terminal interface switching method and mobile terminal | |
CN102722395B (en) | The starting method of mobile terminal and application program thereof | |
TW200514018A (en) | Method and apparatus for modification of pointing device functions in conjunction with dynamic sorting, displaying, listing, and activation | |
CN103927163A (en) | Plugin frame processing device and plugin system | |
CN106055239B (en) | screen recording method and device | |
CN102932694B (en) | Intelligent TV network interface display method and device | |
KR101215175B1 (en) | System and method for providing multi-idle screen | |
CN107895468A (en) | Remote control matching method, device and computer-readable recording medium | |
CN101873366B (en) | Method and device for changing keyboard display according to input information | |
CN106681160A (en) | Method and device for controlling intelligent equipment | |
CN105022642A (en) | Mobile terminal and processing method of loaded content | |
CN101493749A (en) | Windows display status regulation method and apparatus | |
CN101795393A (en) | Method for controlling Internet television by intelligent mobile telephone | |
CN104020976A (en) | Method and device for adjusting screen brightness | |
CN103472972A (en) | Text display format setting unit and text display format setting method for mobile terminals and mobile terminal | |
CN110839171A (en) | Method and device for applying television screen saver and computer storage medium | |
CN105224162A (en) | The matching process of terminal demonstration style and system | |
CN106371836A (en) | Method for implementing variable operating component based on android mobile phone | |
CN104156240A (en) | Client skin template changing method and device, client and electronic device | |
CN105100448A (en) | Method and device for recommending service interface based on terminal dialing | |
CN111413876A (en) | Method for configuring control page of APP, cloud platform and terminal equipment | |
CN105487868A (en) | Method and system for hiding and displaying virtual keys of android device | |
WO2014127652A1 (en) | Incoming call processing method of mobile terminal, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170201 |
|
RJ01 | Rejection of invention patent application after publication |