How to make a line in titanium?

How to draw a line in titanium that works on both Android and iPhone?

+3
source share
3 answers

you can create a web view and use the tag <canvas>to draw in the web view

+2
source

To create a string, I use:

var view = Ti.UI.createView({
    height:180,
    width:300
});

var line = Ti.UI.createView({
    height:2,
    bottom:0,
    left:0,
    right:0,
    borderWidth:1,
    borderColor:'#aaa'
 });

view.add(line);
+5
source

view.xml

<View class="line"></View>

.tss

".line": {
    height: '2dp',
    bottom: '2dp',
    left: '0dp',
    right: '0dp',
    borderWidth: '1',
    borderColor:'#aaa',
}
+2

Source: https://habr.com/ru/post/1770597/


All Articles