Option groupd View header and footer
Is there a way to set the font color?
3 Answers
-
Of course :)
In a HTML tag :
<h1 id="title" style="color: blue;">Exemple</h1>
In your template :
<style>
h1 { color: red; }</style>
With JS :
document.getElementById('idTag').style. color = 'blue';
@tchaOo°
-
Something like this should work:
var headerView = Ti.UI.createView({ height:60 }); var headerLabel = Ti.UI.createLabel({ left:20, width:'auto', height:'5', text:'Title', color:'#f4ca40', shadowColor:'black', shadowOffset:{x:0,y:1}, font:{fontWeight:'bold',fontSize:10} }); headerView.add(headerLabel);
Then in your option group, just add this to it:
headerView:headerView
Can do the same thing for the footer.
-
I can't seem to make it work.. does it work with 0.8.1 SDK?
code below:
var headerView = Titanium.UI.createView({
height:60
});var headerLabel = Titanium.UI.createLabel({ text:'Appcelerator', height:'auto', width:'auto', shadowColor:'#aaa', shadowOffset:{x:5,y:5}, color:'#900', font:{fontSize:48}, textAlign:'center' }); headerView.add(headerLabel); var optionData = [ {image:'option_dawn.png', title:'Dawn', rowHeight:50}, {image:'option_day.png', title:'Day' , selected:true, rowHeight:50}, {image:'option_evening.png', title:'Evening', rowHeight:50}, {image:'option_dusk.png', title:'Dusk', rowHeight:50}, {image:'option_night.png', title:'Night', rowHeight:50} ]; var optionSection = Titanium.UI.iPhone.createGroupedSection({ header:'Background', // headerView:headerView, type:'option', data:optionData });