CN105446736A - Android based method for creating shaded rounded rectangle by using code only - Google Patents
Android based method for creating shaded rounded rectangle by using code only Download PDFInfo
- Publication number
- CN105446736A CN105446736A CN201510780012.5A CN201510780012A CN105446736A CN 105446736 A CN105446736 A CN 105446736A CN 201510780012 A CN201510780012 A CN 201510780012A CN 105446736 A CN105446736 A CN 105446736A
- Authority
- CN
- China
- Prior art keywords
- layer
- android
- rectangle
- rounded rectangle
- code
- 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/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
Abstract
The present invention relates to the technical field of software development, and specifically relates to an Android based method for creating a shaded rounded rectangle by using code only. According to the method provided by the present invention, only code is used, and different image layers are rendered by using a native layer-list technology of Android to generate a shaded rounded rectangle. According to the method provided by the present invention, a configuration for using a picture of a rounded rectangle in a project is optimized; generation efficiency of the picture is effectively improved; a volume of an apk package is reduced; and the method can be applied to development of a picture of a rounded rectangle in development of an Android application.
Description
Technical field
The present invention relates to technical field of software development, be specifically related to a kind of method that pure code based on Android creates band shade round rectangle.
Background technology
In the performance history of Android application, often can use the round rectangle picture of band shade, as the background of button, the background etc. of input frame.Along with the change of demand, picture originally also needs and then to modify, and art designing personnel need again to cut figure, and the new figure that art designing exports by developer imports to project again, and whole process is loaded down with trivial details and efficiency is low.On the other hand, the picture resource due to project too much causes the apk generated to wrap too too fat to move, is unfavorable for the issue of app.
Summary of the invention
The technical matters that the present invention solves is to provide a kind of pure code based on Android to create the method for band shade round rectangle, solves in project the configuration existed when using round rectangle picture dumb, exports slowly and generates apk and wrap excessive problem.
The technical scheme that the present invention solves the problems of the technologies described above is:
By the mode of pure code, use the primary layer-list technology of android to play up the round rectangle that different layer generates band shade, specifically comprise the steps:
1st step, under project res catalogue, set up drawable catalogue;
2nd step, to create with layer-list be the resource file of root label;
The layer of the 3rd step, establishment shaded rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
The layer of the 4th step, background rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
5th step, the background attribute of View is set in topology file, quotes layer-list resource file.
The invention has the beneficial effects as follows: optimize in project configuration when using round rectangle picture, the effective formation efficiency improving picture decreases apk inclusion simultaneously and amasss.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is drawable file structure figure of the present invention;
Fig. 2 is operational flowchart of the present invention.
Embodiment
See shown in accompanying drawing 1,2, the present invention is to install the exploitation computer of linux system; Be specifically described; Specifically comprise the steps:
1st step, under project res catalogue, set up drawable catalogue;
2nd step, to create with layer-list be the resource file of root label;
The layer of the 3rd step, establishment shaded rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
The layer of the 4th step, background rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
5th step, the background attribute of View is set in topology file, quotes layer-list resource file.
Claims (1)
1. the pure code based on Android creates the method being with shade round rectangle, it is characterized in that: by the mode of pure code, use the primary layer-list technology of android to play up the round rectangle that different layer generates band shade, specifically comprise the steps:
1st step, under project res catalogue, set up drawable catalogue;
2nd step, to create with layer-list be the resource file of root label;
The layer of the 3rd step, establishment shaded rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
The layer of the 4th step, background rectangle, arranges color, shape, radius of corner and inset spacing off-set value attribute;
5th step, the background attribute of View is set in topology file, quotes layer-list resource file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510780012.5A CN105446736A (en) | 2015-11-12 | 2015-11-12 | Android based method for creating shaded rounded rectangle by using code only |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510780012.5A CN105446736A (en) | 2015-11-12 | 2015-11-12 | Android based method for creating shaded rounded rectangle by using code only |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105446736A true CN105446736A (en) | 2016-03-30 |
Family
ID=55556983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510780012.5A Pending CN105446736A (en) | 2015-11-12 | 2015-11-12 | Android based method for creating shaded rounded rectangle by using code only |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105446736A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107229439A (en) * | 2016-03-24 | 2017-10-03 | 阿里巴巴集团控股有限公司 | A kind of method and device for showing picture |
CN111930291A (en) * | 2020-10-09 | 2020-11-13 | 广州宸祺出行科技有限公司 | Method and system for realizing personalized shadow on Android platform |
CN112463153A (en) * | 2020-12-07 | 2021-03-09 | 吉林亿联银行股份有限公司 | Method and system for realizing fillet and shadow of UIView |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882077A (en) * | 2010-05-19 | 2010-11-10 | 广东威创视讯科技股份有限公司 | Method and device for efficiently drawing and rendering basic graphic |
US20140125672A1 (en) * | 2012-11-02 | 2014-05-08 | Microsoft Corporation | Cross-platform data visualizations using common descriptions |
US20140247271A1 (en) * | 2013-03-04 | 2014-09-04 | Microsoft Corporation | Data visualization |
CN104331527A (en) * | 2013-07-22 | 2015-02-04 | 腾讯科技(深圳)有限公司 | Picture generating method and picture generating device |
-
2015
- 2015-11-12 CN CN201510780012.5A patent/CN105446736A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882077A (en) * | 2010-05-19 | 2010-11-10 | 广东威创视讯科技股份有限公司 | Method and device for efficiently drawing and rendering basic graphic |
US20140125672A1 (en) * | 2012-11-02 | 2014-05-08 | Microsoft Corporation | Cross-platform data visualizations using common descriptions |
US20140247271A1 (en) * | 2013-03-04 | 2014-09-04 | Microsoft Corporation | Data visualization |
CN104331527A (en) * | 2013-07-22 | 2015-02-04 | 腾讯科技(深圳)有限公司 | Picture generating method and picture generating device |
Non-Patent Citations (1)
Title |
---|
范美英著: "《Android用户体验与UI设计》", 31 July 2015, 知识产权出版社 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107229439A (en) * | 2016-03-24 | 2017-10-03 | 阿里巴巴集团控股有限公司 | A kind of method and device for showing picture |
CN107229439B (en) * | 2016-03-24 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Method and device for displaying picture |
CN111930291A (en) * | 2020-10-09 | 2020-11-13 | 广州宸祺出行科技有限公司 | Method and system for realizing personalized shadow on Android platform |
CN112463153A (en) * | 2020-12-07 | 2021-03-09 | 吉林亿联银行股份有限公司 | Method and system for realizing fillet and shadow of UIView |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI533213B (en) | Storing and resuming application runtime state | |
US11086662B2 (en) | Method and system of migrating applications to a cloud-computing environment | |
CN104468226A (en) | Nginx configuration method and device | |
CN105446736A (en) | Android based method for creating shaded rounded rectangle by using code only | |
CN107608675B (en) | Cross-platform front-end development system and method based on virtual document object model | |
CN103176802B (en) | Realize the method that the user interface UI of system separates with widget library by control pond | |
CN104517307B (en) | A kind of animation method and device | |
US20150373102A1 (en) | Deployment of virtual machine disks from a shared network file system | |
CN103064667A (en) | Method for controlling hardware equipment based on JavaScript extension | |
CN109656617A (en) | A kind of front end Web Service dispositions method, storage medium, electronic equipment and system | |
CN104965672A (en) | Method for automatically, rapidly and conveniently configuring RAID | |
CN105656970A (en) | RAID (Redundant Array of Independent Disk) card configuring method and system and relevant device | |
CN107391665A (en) | The creation method and device of a kind of database instance | |
CN104134228A (en) | Booting/shutdown animation making system and booting/shutdown animation making method based on Android system | |
WO2009019631A3 (en) | System and method for implementation of java ais api | |
CN104361098A (en) | Method applied to customization of nodes in topological graph of cloud system | |
CN109992801B (en) | PCB updating method based on PADS software | |
KR101519381B1 (en) | Apparatus and method for making web application using html5 | |
CN110554873B (en) | System, computer device and storage medium for realizing man-machine interaction interface | |
US20150195177A1 (en) | Service management in appliance-based solutions | |
CN107391135A (en) | A kind of view steering method based on Objective C | |
CN111459573A (en) | Method and device for starting intelligent contract execution environment | |
CN104866313A (en) | Universal method for uploading files in JSP | |
US9588918B2 (en) | Storage control devices and method therefor to invoke address thereof | |
CN105786489B (en) | A kind of construction method of the stateless virtualization calculate node of safety |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160330 |