CN108121584A - A kind of method shown from right to left - Google Patents
A kind of method shown from right to left Download PDFInfo
- Publication number
- CN108121584A CN108121584A CN201711388298.8A CN201711388298A CN108121584A CN 108121584 A CN108121584 A CN 108121584A CN 201711388298 A CN201711388298 A CN 201711388298A CN 108121584 A CN108121584 A CN 108121584A
- Authority
- CN
- China
- Prior art keywords
- view
- sub
- width
- stacklayout
- layout
- 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
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The present invention relates to a kind of methods shown from right to left, include the following steps:A layout control StackLayout is set, for controlling the layout of View;Sub- View is placed in layout control StackLayout, the sub- View is used for horizontal inverted order and preferentially shows;The size of sub- View is set, and the size includes width and height;Sizes of the StackLayout in his father View is calculated, calculates sizes of the sub- View in StackLayout, whether the sum of the width of all sub- View has been more than the width of StackLayout for review, if it is, calculating sub- View width again.The present invention preferentially shows from right to left, can be compatible with according to content length and preferentially from left to right shown, Measure and Layout frame of the layout control based on android system, can the seamless use under android system, easy to use, user experience is good.
Description
Technical field
The present invention relates to graphic display technology fields, are specifically a kind of method shown from right to left.
Background technology
In existing android system, there are many layout control control, but mostly using preferential from left to right display content
Mode, it is impossible to support the mode of preferential display content from right to left.
When running into content length difference, only with from left to right showing, scheme is single, is unfavorable for typesetting, beauty.Example
Such as:As shown in Fig. 2, under the mode from left to right shown, the word on the right(Or picture)Content is compressed, can not be it is clear that shadow
Ring usage experience.
The content of the invention
For defect in the prior art, it is an object of the invention to provide a kind of method shown from right to left,
It preferentially shows from right to left, can be compatible with according to content length and preferentially from left to right shown, layout control is based on android system
Measure and Layout frames, can the seamless use under android system, easy to use, user experience is good.
To achieve the above objectives, the present invention adopts the technical scheme that:
A kind of method shown from right to left, which is characterized in that include the following steps:
A layout control StackLayout is set, for controlling the layout of View;
Sub- View is placed in layout control StackLayout, the sub- View is used for horizontal inverted order and preferentially shows;
The size of sub- View is set, and the size includes width and height;
Sizes of the StackLayout in his father View is calculated,
Sizes of the sub- View in StackLayout is calculated,
Whether the sum of the width of all sub- View has been more than the width of StackLayout for review, if it is, calculating son again
View width.
Based on the above technical solutions, in layout control StackLayout, the width of StackLayout is preset
With the default value of height;
Or it is defaulted as according to the size of sub- View come adaptive.
Based on the above technical solutions, when the size of sub- View is set, directly set using View sizes in Android
The mode of putting is configured.
Based on the above technical solutions, when calculating sub- View width again, default priority reservation is eventually adding
The width of sub- View, it is then preferential to retain time width of the rear sub- View added in, and so on.
Based on the above technical solutions, when calculating sub- View width again, once find the son calculated again
The sum of View width is more than the width of StackLayout again, can remaining sub- View width be arranged to 0.
The method of the present invention shown from right to left, preferentially shows from right to left, can be compatible with according to content length excellent
It first from left to right shows, Measure and Layout frame of the layout control based on android system can be in android system
Under seamless use, easy to use, user experience is good.
Using the arrangement space of the present invention program, View can be controlled to be laid out behavior in Android device.Based on transverse direction
LinearLayout, the View that compatible all Android are provided, preferentially can from right to left show automatically according to content length,
Any special setting need not be done, easy to use, user experience is good.
Description of the drawings
The present invention has drawings described below:
The flow chart of Fig. 1 present invention.
Fig. 2 from left to right display schematic diagrams.
Fig. 3 display schematic diagrams from right to left.
Specific embodiment
The present invention is described in further detail below in conjunction with attached drawing.
As shown in Figure 1, the method for the present invention shown from right to left, includes the following steps:
A layout control StackLayout is set, for controlling the layout of View;
Sub- View is placed in layout control StackLayout, the sub- View is used for horizontal inverted order and preferentially shows;
The size of sub- View is set, and the size includes width and height;
Sizes of the StackLayout in his father View is calculated,
Sizes of the sub- View in StackLayout is calculated,
Whether the sum of the width of all sub- View has been more than the width of StackLayout for review, if it is, calculating son again
View width.
Based on the above technical solutions, in layout control StackLayout, the width of StackLayout is preset
With the default value of height;
Or it is defaulted as according to the size of sub- View come adaptive.
Based on the above technical solutions, when the size of sub- View is set, directly set using View sizes in Android
The mode of putting is configured.
Based on the above technical solutions, when calculating sub- View width again, default priority reservation is eventually adding
The width of sub- View, it is then preferential to retain time width of the rear sub- View added in, and so on.
Based on the above technical solutions, when calculating sub- View width again, once find the son calculated again
The sum of View width is more than the width of StackLayout again, can remaining sub- View width be arranged to 0.
As shown in Figure 2,3, using scheme of the present invention, the defects of existing display modes of Fig. 2, the right can be efficiently modified
Word(Or picture)Content clearly easily recognizes that user experience is good.
The content not being described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.
Claims (5)
- A kind of 1. method shown from right to left, which is characterized in that include the following steps:A layout control StackLayout is set, for controlling the layout of View;Sub- View is placed in layout control StackLayout, the sub- View is used for horizontal inverted order and preferentially shows;The size of sub- View is set, and the size includes width and height;Sizes of the StackLayout in his father View is calculated,Sizes of the sub- View in StackLayout is calculated,Whether the sum of the width of all sub- View has been more than the width of StackLayout for review, if it is, calculating son again View width.
- 2. the method as described in claim 1 shown from right to left, it is characterised in that:In layout control StackLayout, The width of default StackLayout and the default value of height;Or it is defaulted as according to the size of sub- View come adaptive.
- 3. the method as described in claim 1 shown from right to left, it is characterised in that:When the size of sub- View is set, directly It is configured using View sizes set-up mode in Android.
- 4. the method as described in claim 1 shown from right to left, it is characterised in that:When calculating sub- View width again, The width for the sub- View that default priority reservation is eventually adding, it is then preferential to retain time width of the rear sub- View added in, with such It pushes away.
- 5. the method as described in claim 1 shown from right to left, it is characterised in that:When calculating sub- View width again, Once it was found that the sum of sub- View width calculated again again be more than StackLayout width, can be by remaining sub- View wide Degree is arranged to 0.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711388298.8A CN108121584A (en) | 2017-12-20 | 2017-12-20 | A kind of method shown from right to left |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711388298.8A CN108121584A (en) | 2017-12-20 | 2017-12-20 | A kind of method shown from right to left |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108121584A true CN108121584A (en) | 2018-06-05 |
Family
ID=62230870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711388298.8A Pending CN108121584A (en) | 2017-12-20 | 2017-12-20 | A kind of method shown from right to left |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108121584A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111176769A (en) * | 2019-12-19 | 2020-05-19 | 贵阳语玩科技有限公司 | Multi-picture display method for Android terminal |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890632A (en) * | 2012-09-18 | 2013-01-23 | 深圳市融创天下科技股份有限公司 | Screen adaptation method, system and terminal device |
CN102929603A (en) * | 2012-09-28 | 2013-02-13 | 用友软件股份有限公司 | Interface control arrangement device and interface control arrangement method |
CN103164197A (en) * | 2011-12-14 | 2013-06-19 | 中兴通讯股份有限公司 | User interface (UI) distribution self-adaption method, mobile device and distribution generating device |
CN103365532A (en) * | 2012-04-11 | 2013-10-23 | 中兴通讯股份有限公司 | Change method and change system of terminal application display |
CN104007991A (en) * | 2014-06-06 | 2014-08-27 | 百度在线网络技术(北京)有限公司 | Method and device for adjusting application program interface layout |
CN104932877A (en) * | 2015-04-24 | 2015-09-23 | 陈小州 | Method for designing application program interface for intelligent terminal |
CN105094584A (en) * | 2014-05-16 | 2015-11-25 | 北大方正集团有限公司 | View scaling processing method and view scaling processing apparatus |
US9304837B2 (en) * | 2004-11-16 | 2016-04-05 | Open Text S.A. | Cellular user interface |
CN105872706A (en) * | 2015-12-30 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Display control method and device |
US20160267056A1 (en) * | 2015-03-11 | 2016-09-15 | Nexthink S.A. | Screen layout manager |
CN107122104A (en) * | 2017-03-29 | 2017-09-01 | 武汉斗鱼网络科技有限公司 | data display method and device |
-
2017
- 2017-12-20 CN CN201711388298.8A patent/CN108121584A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9304837B2 (en) * | 2004-11-16 | 2016-04-05 | Open Text S.A. | Cellular user interface |
CN103164197A (en) * | 2011-12-14 | 2013-06-19 | 中兴通讯股份有限公司 | User interface (UI) distribution self-adaption method, mobile device and distribution generating device |
CN103365532A (en) * | 2012-04-11 | 2013-10-23 | 中兴通讯股份有限公司 | Change method and change system of terminal application display |
CN102890632A (en) * | 2012-09-18 | 2013-01-23 | 深圳市融创天下科技股份有限公司 | Screen adaptation method, system and terminal device |
CN102929603A (en) * | 2012-09-28 | 2013-02-13 | 用友软件股份有限公司 | Interface control arrangement device and interface control arrangement method |
CN105094584A (en) * | 2014-05-16 | 2015-11-25 | 北大方正集团有限公司 | View scaling processing method and view scaling processing apparatus |
CN104007991A (en) * | 2014-06-06 | 2014-08-27 | 百度在线网络技术(北京)有限公司 | Method and device for adjusting application program interface layout |
US20160267056A1 (en) * | 2015-03-11 | 2016-09-15 | Nexthink S.A. | Screen layout manager |
CN104932877A (en) * | 2015-04-24 | 2015-09-23 | 陈小州 | Method for designing application program interface for intelligent terminal |
CN105872706A (en) * | 2015-12-30 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Display control method and device |
CN107122104A (en) * | 2017-03-29 | 2017-09-01 | 武汉斗鱼网络科技有限公司 | data display method and device |
Non-Patent Citations (2)
Title |
---|
TAOTUNE: ""stacklayout布局"", 《HTTPS://BLOG.CSDN.NET/U010085607/ARTICLE/DETAILS/9033119》 * |
TAOTUNE: ""stacklayout布局"", 《STACKLAYOUT布局》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111176769A (en) * | 2019-12-19 | 2020-05-19 | 贵阳语玩科技有限公司 | Multi-picture display method for Android terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2015153197A (en) | ADAPTIVE MAPPING TRANSITION MANAGEMENT FOR VARIOUS VIDEO PLAYBACK SCENARIOS | |
MX2018004890A (en) | Parking support information display method and parking support device. | |
AU2018253642A1 (en) | Systems and methods for auto-scaling a big data system | |
JP2016503217A5 (en) | ||
EP2518997A3 (en) | Digital photographing apparatus, method of controlling the same, and computer-readable storage medium | |
AU2014280948A1 (en) | Video segmentation method | |
JP2012203832A5 (en) | ||
EP2879047A3 (en) | Mobile terminal and controlling method thereof | |
WO2017215142A1 (en) | Method and apparatus for adjusting colour temperature of terminal display content | |
EP2527998A3 (en) | Mobile terminal and controlling method thereof | |
CN105975046A (en) | Photographing preview method and device | |
CN103747358A (en) | Video playing method and apparatus | |
CN105607816B (en) | The display methods and device of chat list | |
WO2017088440A1 (en) | Method for extending operable duration of terminal device and terminal device | |
CN108664228A (en) | A kind of method for displaying image and mobile terminal | |
EP3575699A3 (en) | Method for controlling terminal apparatus that remotely controls air conditioner, non-transitory recording medium storing program executed by terminal apparatus, and terminal apparatus | |
CN108121584A (en) | A kind of method shown from right to left | |
JP2011022712A5 (en) | ||
PH12018501190A1 (en) | Elevator system having destination call control | |
CN104506943A (en) | Set top box software customized upgrading method | |
CN103260074A (en) | Method, device and terminal of image displaying | |
JP2015046707A5 (en) | ||
CN104244065B (en) | A kind of method and device of captions processing | |
CN104361851A (en) | Refreshing method and system of display screen and display screen controller | |
CN106060635A (en) | Double-screen different-display method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |