Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

How to make GridView

$
0
0

How to create GridView for iOS (iPhone/iPhone5/ iPad) How to get Gridview in Potrait 33 matrix and in landscape 42 matrix.

var topGrid = 0;
    var leftGrid = 0;
    var  containerHeight = 108;
    var  containerWidth = 106;
//     
    for(var i=0; i<9; i++){   
 
     var view_Grid = Titanium.UI.createView({
         width:containerWidth,
         height:containerHeight,
         backgroundColor:'red',
         borderColor:'green',
         borderRadius:'4',
         borderWidth:'2',
 
        }); 
        // alert(leftGrid);
        if(leftGrid > 212){
            topGrid = topGrid+containerHeight;
            leftGrid = 0;
        }   
 
         view_Grid.top=topGrid;
         view_Grid.left=leftGrid;
        leftGrid = leftGrid + containerWidth;
 
        $.view_GridBox.add(view_Grid);  
    }
Can any one advice me where i can get grid view for dynamically load in both orientation.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>