Ui library stage progress (completed text list, style list (style list can be inherited ))

Source: Internet
Author: User

There are five XML files in total: animation. XML (not explained at the moment)

Dialog. xml

Stringtable. xml

Style. xml

Testbutton. xml

 

Style reference. The content and relationship referenced by stringtable are roughly as follows:

 1   <  Panel  Name  = "Testbutton"  Pos  = "5,-105,-5,-5" Style  = "Panel"  >  2     <  Button  Name  = "Colorbtn1"  Pos  = "5, 4, 45, 35"  Txt  = "Str | colorbtn1"  Style  = "Btncolor1"  />  3     < Button  Name  = "Colorbtn2"  Pos  = "50, 4, 90, 35"  Txt  = "Str | colorbtn2"  Style  = "Btncolor2"  />  4     <  Button  Name  = "Imgbtn1"  Pos  = ", 5" Txt  = "Str | imgbtn1"  Style  = "Btnimg1"  />  5     <  Button  Name  = "Imgbtn2"  Pos  = "155, 265, 45"  Txt  = "Str | imgbtn2"  Style  = "Btnimg2"  /> 6     <  Button  Name  = "Imgbtn3"  Pos  = ", 5"  Txt  = "Str | imgbtn3"  Style  = "Btnimg3"  />  7   </  Panel  > 

AboveCodeObviously, the descriptions of a button are much less, and the content described by the style attribute is in style. xml;

 1   <  Style  Name  = "Panel"  >  2     <  ATT  Name  = "Bgmode"  Value  = "2"  />  3     < ATT  Name  = "Bgimg"  Value  = "Panelbg.png"  />  4     <  ATT  Name  = "Bgstretch"  Value  = "5, 5, 5"  />  5     <  ATT Name  = "Fcolor"  Value  = "Ff000000"  />  6   </  Style  >  7   <  Style  Name  = "Btncolor1"  >  8     < ATT  Name  = "Bgmode"  Value  = "0"  />  9     <  ATT  Name  = "Bgcolor"  Value  = "Ffff0000"  />  10     <  ATT Name  = "Bghovercolor"  Value  = "Ff00ff00"  />  11   </  Style  >  12   <  Style  Name  = "Btncolor2"  Inherit  = "Btncolor1"  > <! --  Note that it can be inherited  -->  13     <  ATT  Name  = "Disable"  Value  = "1"  />  14   </  Style  >  15   < Style  Name  = "Btnimg1"  >  16     <  ATT  Name  = "Fcolor"  Value  = "Ff00ff00"  />  17     <  ATT  Name  = "Bgmode" Value  = "1"  />  18     <  ATT  Name  = "Bgimg"  Value  = "Btnbg.png"  />  19   </  Style  >  20   < Style  Name  = "Btnimg2"  >  21     <  ATT  Name  = "Fcolor"  Value  = "Ff00ff00"  />  22     <  ATT  Name  = "Bgmode" Value  = "2"  />  23     <  ATT  Name  = "Bgimg"  Value  = "Btnbg.png"  />  24     <  ATT  Name  = "Bgstretch"  Value = "5, 5, 5"  />  25   </  Style  >  26   <  Style  Name  = "Btnimg3"  Inherit  = "Btnimg2"  >  27     <  ATT Name  = "Disable"  Value  = "1"  />  28   </  Style  > 

Note: The attribute content of the style supports inheritance, which can reduce the amount of XML and increase the resolution speed;

In addition, the text on the button:

 
TXT = "str | imgbtn3"

Supports indexing from stringtable. "str |" is a keyword, indicating a problem in the index character list. You can also enter the text directly;

In this way, the xml configuration is basically ready;

The following plan is to begin the design of skin changing, color changing, and text changing functions (these are basic support frameworks and need to be prepared before the mass write controls are started, otherwise, the system will not be able to lag behind the scenes );

 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.