1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Define the component

appUI.createTextField = function(_args) {

	// Create the desc textfield

	var textfield = Titanium.UI.createTextField({

		value: _args.value,
    	color:'#5c5c5c',
    	hintText: _args.hinttext,
    	height:40,
    	width:290,
   	 	top:3,
		backgroundColor: 'transparent',
    	clearButtonMode: true,
    	paddingLeft: 10,
    	shadowColor: '#fff',
    	shadowOffset: {x:0, y:1}
    
	});
	
	// Check the alignment
	
	if (_args.container == "top") {
	
		// Create the field top

		var top = Titanium.UI.createView({  

			top: _args.vertical,
			width: 320,
			height: 45,
			backgroundImage: '../images/table/topRow.png'
    
		});
	
		// Add field to top
	
		top.add(textfield);
 
		// Return the finished button
	
		return top;
	
	} else if (_args.container == "middle") {
	
		// Create the field top

		var middle = Titanium.UI.createView({  

			top: _args.vertical,
			width: 320,
			height: 45,
			backgroundImage: '../images/table/middleRow.png'
    
		});
	
		// Add field to top
	
		middle.add(textfield);
 
		// Return the finished button
	
		return middle;
	
	} else if (_args.container == "bottom") {
	
		// Create the field top

		var bottom = Titanium.UI.createView({  

			top: _args.vertical,
			width: 320,
			height: 60,
			backgroundImage: '../images/table/bottomRow.png'
    
		});
	
		// Add field to top
	
		bottom.add(textfield);
 
		// Return the finished button
	
		return bottom;
	
	} else {
	
		// Create the field top

		var single = Titanium.UI.createView({  

			top: _args.vertical,
			width: 320,
			height: 45,
			backgroundImage: '../images/table/topAndBottomRow.png'
    
		});
	
		// Add field to top
	
		single.add(textfield);
 
		// Return the finished button
	
		return single;
	
	}

};