Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Making ListView background Color and Seprator color Transparent

$
0
0

Hi

I am making an app using ListView in titanium.ListView is working perfectly in android but in iOS it is showing white row colors.Doing the ListView background transparent working for portion other than rows.How can i make rows background color transparent and also i want separator color to be transparent.Here is my code

var self=Ti.UI.createWindow()
var contacts = ['Bocar A,BA', 'Chief Executive Officer', 'Samena Telecommunications Council', 'UAE', 'boar@samenacouncil.org', '+9711234567'];
 
    var myTemplate = {
        childTemplates : [{
            type : 'Ti.UI.Label',
            bindId : 'label',
            properties : {
                font : {
                    fontSize : myfontsize * .4
                },
                color : 'white',
                //top : '%',
                left : '15%',
                height : '70%',
                width : Ti.UI.SIZE
            }
        }],
    };
 
    var sections = [];
    for ( i = 0; i < contacts.length; i++) {
        var rowSection = Ti.UI.createListSection({
        });
 
        var rowDataSet = [{
            label : {
                text : contacts[i]
            },
            properties : {
                itemId : i,
                height : 65
            }
        }];
        rowSection.setItems(rowDataSet);
        sections.push(rowSection);
    }
 
    var listView = Ti.UI.createListView({
        templates : {
            template : myTemplate
        },
        defaultItemTemplate : 'template',
        backgroundColor : 'transparent',
        top : '14.5%',
        width : Ti.UI.FILL,
        height : '75.5%'
    });
    self.add(listView);
    listView.setSections(sections);
        self.open();
Thanks

Viewing all articles
Browse latest Browse all 7655

Trending Articles



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