User Tools

Site Tools


built_in:lists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
built_in:lists [2015/03/08 10:38]
octazid [Description]
built_in:lists [2016/08/02 19:17]
administrator change method object name
Line 73: Line 73:
   * "video"   * "video"
   * "playlist"    * "playlist" 
 +
 +You can also use resource images or images from your sdcard instead of the keywords, for example:- "Img/MyIcon.png" or "/sdcard/images/image1.jpg"
 +  
  
 ====Example - Title + Icon==== ====Example - Title + Icon====
Line 94: Line 97:
 </code> </code>
  
-====Example - Title + Icon====+====Example - Title + Body====
 <code javascript> <code javascript>
 function OnStart() function OnStart()
Line 173: Line 176:
 </code> </code>
  
 +
 +====Example - HTML Font Color====
 +<code javascript>
 +function OnStart()
 +{
 +    //Create a layout with objects vertically centered.
 +    lay = app.CreateLayout( "linear", "VCenter,FillXY" );    
 +
 +    //Create a list and add it to layout.
 +    var data =
 +    "<font color='#ff0000'>Red</font>,"+
 +    "<font color='#00ff00'>Green</font>,"+
 +    "<font color='#0000ff'>Blue</font>"
 +    lst = app.CreateList( data,-1,-1,"html" );
 +    lay.AddChild( lst );
 +    
 +    //Add layout to app.    
 +    app.AddLayout( lay );
 +}
 +</code>
 ---- ----
  
Line 178: Line 201:
 Some controls use the same methods.\\ Some controls use the same methods.\\
 For examples of the **[[same methods]]** look here. For examples of the **[[same methods]]** look here.
-^Method ^Description ^ +^ Method                                                           ^ Description                                                                       
-|ListView.AddItem( title,body,image ) | | +List.AddItem( title,body,image )                                                                                                               
-|ListView.Destroy() | | +List.GetAbsHeight()                                                                                                                            
-|ListView.GetAbsHeight() | | +List.GetAbsWidth()                                                                                                                             
-|ListView.GetAbsWidth() | | +List.GetHeight()                                                                                                                               
-|ListView.GetHeight() | | +List.GetItemByIndex( index )                                                                                                                   | 
-|ListView.GetList( delimeter ) | string = list.GetList(",");+| List.GetLength()                                                                                                                               
-|ListView.GetPosition() | | +List.GetList( delimeter )                                    | string = list.GetList(","); \\ List.GetList() with no params returns object list  
-|ListView.GetTextSize( mode ) | | +List.GetPosition()                                                                                                                             
-|ListView.GetType() | | +List.GetTextSize( mode )                                                                                                                       
-|ListView.GetVisibility() | | +List.GetType()                                                                                                                                 
-|ListView.GetWidth() | | +List.GetVisibility()                                                                                                                           
-|ListView.Release() | | +List.GetWidth()                                                                                                                                
-|ListView.RemoveItem( title ) | | +List.InsertItem(index,title,body,image)                      |                                                                                   | 
-|ListView.ScrollToItem( name,body ) | | +| List.RemoveAll()                                                                                                                               
-|ListView.SelectItem( title,body,scrollTo ) | | +List.RemoveItem( title )                                                                                                                       
-|ListView.SelectItemByIndex( index,scroll ) | index is a number, \\ scroll could be true or false | +List.RemoveItemByIndex( index )                              |                                                                                   | 
-|ListView.SetBackColor( colorCode ) | | +| List.ScrollToItem( name,body )                               |                                                                                   | 
-|ListView.SetBackGradient( color1,color2,color3,p4,p5,p6,p7 ) | | +| List.ScrollToItemByIndex( index )                                                                                                              
-|ListView.SetBackGradientRadial( x,y,r,color1,color2,color3,p7 ) | | +List.SelectItem( title,body,scrollTo )                                                                                                         
-|ListView.SetBackground( imagefile,options ) | | +List.SelectItemByIndex( index,scroll )                       | index is a number, \\ scroll could be true or false                               
-|ListView.SetDivider( height,color ) | | +List.SetBackColor( colorCode )                                                                                                                 
-|ListView.SetEllipsize( mode ) | | +List.SetBackGradient( color1,color2,color3,p4,p5,p6,p7 )                                                                                       
-|ListView.SetEllipsize1( mode ) | | +List.SetBackGradientRadial( x,y,r,color1,color2,color3,p7 )                                                                                    
-|ListView.SetEllipsize2( mode ) | | +List.SetBackground( imagefile,options )                                                                                                        
-|ListView.SetFontFile( file ) | | +List.SetDivider( height,color )                                                                                                                
-|ListView.SetHiTextColor1( colorCode ) | | +List.SetEllipsize( mode )                                                                                                                      
-|ListView.SetHiTextColor2( colorCode ) | | +List.SetEllipsize1( mode )                                                                                                                     
-|ListView.SetItem( title,newTitle,newBody,newImage ) | | +List.SetEllipsize2( mode )                                                                                                                     
-|ListView.SetList( list,delimeter ) | | +List.SetFontFile( file )                                                                                                                       
-|ListView.SetMargins( left,top,right,bottom ) | | +List.SetHiTextColor1( colorCode )                                                                                                              
-|ListView.SetOnLongTouch( callback ) |sets the function called when list is long-touched | +List.SetHiTextColor2( colorCode )                                                                                                              
-|ListView.SetOnTouch( callback ) |sets the function called when list is touched | +List.SetItem( title,newTitle,newBody,newImage )                                                                                                | 
-|ListView.SetPadding( left,top,right,bottom ) | | +| List.SetItemByIndex( index,newTitle,newBody,newImage )                                                                                         
-|ListView.SetPosition( left,top,width,height ) | | +List.SetList( list,delimeter )                                                                                                                 
-|ListView.SetScale( x,y ) | | +List.SetMargins( left,top,right,bottom )                                                                                                       
-|ListView.SetSize( width,height ) | | +List.SetOnLongTouch( callback )                              | sets the function called when list is long-touched                                
-|ListView.SetTextColor( colorCode ) | | +List.SetOnTouch( callback )                                  | sets the function called when list is touched                                     
-|ListView.SetTextColor1( colorCode ) | | +List.SetPadding( left,top,right,bottom )                                                                                                       
-|ListView.SetTextColor2( colorCode ) | | +List.SetPosition( left,top,width,height )                                                                                                      
-|ListView.SetTextMargins( left,top,right,bottom ) | | +List.SetScale( x,y )                                                                                                                           
-|ListView.SetTextShadow( radius,dx,dy,color ) | | +List.SetSize( width,height )                                                                                                                   
-|ListView.SetTextShadow1( radius,dx,dy,color ) | | +List.SetTextColor( colorCode )                                                                                                                 
-|ListView.SetTextShadow2( radius,dx,dy,color ) | | +List.SetTextColor1( colorCode )                                                                                                                
-|ListView.SetTextSize( size,mode ) | | +List.SetTextColor2( colorCode )                                                                                                                
-|ListView.SetVisibility( ShowHide ) | | +List.SetTextMargins( left,top,right,bottom )                                                                                                   
 +List.SetTextShadow( radius,dx,dy,color )                                                                                                       
 +List.SetTextShadow1( radius,dx,dy,color )                                                                                                      
 +List.SetTextShadow2( radius,dx,dy,color )                                                                                                      
 +List.SetTextSize( size,mode )                                                                                                                  
 +List.SetVisibility( ShowHide )                                                                                                                 |
  
 ===== Available Options ===== ===== Available Options =====
  
-^Option ^Description ^ +^ Option        ^ Description                                                 
-|AlumButton|Use this to display the list \\ as buttons| +| AlumButton    | Use this to display the list \\ as buttons                  
-|FontAwesome|Use this to display Icons \\ from this inbuilt font| +| FontAwesome   | Use this to display Icons \\ from this inbuilt font         
-|GreenButton|Use this to display the list \\ as buttons| +| GreenButton   | Use this to display the list \\ as buttons                  | 
-|OrangeButton|Use this to display the list \\ as buttons| +| Html          | Use this option to display html formated code               
-|WhiteGrad|Use this to display the list \\ with a gradient background|+| OrangeButton  | Use this to display the list \\ as buttons                  
 +| WhiteGrad     | Use this to display the list \\ with a gradient background  |
  
 ===== Sample callbacks ===== ===== Sample callbacks =====
built_in/lists.txt · Last modified: 2019/09/01 00:10 (external edit)