Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11232

Android: TableView / HeaderView Android Parity Issue

    Details

      Description

      A headerview added to a tableview in android allocates space but does not show any children(or backgrounds) the way it does on iOS. Sample code below:

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
       
      navWindow = Ti.UI.createWindow();
       
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          backgroundColor:'#fff'
      });
       
      var data = [
      	{title:'Alan', hasChild:true, header:'A'},
      	{title:'Alice', hasDetail:true},
      	{title:'Alexander'},
      	{title:'Amos'},
      	{title:'Alonzo'},
      	{title:'Brad', header:'B'},
      	{title:'Brent'},
      	{title:'Billy'},
      	{title:'Brenda'},
      	{title:'Potsie'}
      ];
       
      	var header=Ti.UI.createView({
      		width:'100%',
      		backgroundColor:'red',
      		height:149
      	});
      	
      	
      	// Create a Label.
      	var aLabel = Ti.UI.createLabel({
      		text : 'aLabel',
      		color : 'black',
      		font : {fontSize:22},
      		height : 44,
      		width : 222,
      		top : 2,
      		left : 5,
      		textAlign : 'center'
      	});
      	
      	// Add to the parent view.
      	header.add(aLabel);
      	
       
      var tableview = Titanium.UI.createTableView({
      	data:data,
      	headerView:header
      });
       
       
      win1.add(tableview);
       
      win1.open();
      

        Attachments

          Activity

            People

            • Assignee:
              sunila Sunila
              Reporter:
              tvfoodmaps Frank Apap
              Reviewer:
              Hieu Pham
              Tester:
              Lokesh Choudhary
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-14511
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code