Created
July 1, 2014 09:55
-
-
Save Amimul100/d0ff82efdf1849b6978f to your computer and use it in GitHub Desktop.
Titanium Color Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hi, I have tested this issue in Ti SDK 3.3.0.RC. It’s working good. | |
Testing Environment: | |
Titanium SDK: 3.3.0.RC, 3.2.3.GA | |
Titanium CLI: 3.2.3 | |
Android and iOS device | |
Appcelerator Studio, build: 3.3.0.201406271159 | |
Step to Reproduce | |
Create a sample Ti Classic project from AppC Studio | |
Update app.js file with test code | |
Run on Android device | |
A Tableview with different colored row will show | |
*/ | |
var colorArray = [ | |
'#ff00ff', '#f0f', 'rgb(255,0,255)', | |
'transparent', '#55ff00ff', '#5f0f', 'rgba(255,0,255,0.3)', | |
'aqua', 'black', 'blue', 'brown', 'cyan', 'darkgray', 'fuchsia', 'gray', 'green', | |
'lightgray', 'lime', 'magenta', 'maroon', 'navy', 'olive', 'orange', 'pink', | |
'purple', 'red', 'silver', 'teal', 'white', 'yellow', | |
]; | |
var win = Ti.UI.createWindow({ | |
backgroundColor: 'black', | |
exitOnClose: true, | |
fullscreen: false, | |
layout: 'vertical', | |
title: 'Color Demo' | |
}); | |
var rows = []; | |
var row; | |
for (var i=0, ilen = colorArray.length; i < ilen; i++){ | |
row = Ti.UI.createTableViewRow({ | |
color:'black', | |
backgroundColor: colorArray[i], | |
title: colorArray[i], | |
height: 40 | |
}); | |
rows.push(row); | |
} | |
var table = Ti.UI.createTableView({ | |
data: rows, | |
backgroundColor: 'white' | |
}); | |
win.add(table); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment