android - UI error in Titanium Alloy Screen when no top margin is defined -
android - UI error in Titanium Alloy Screen when no top margin is defined -
hi newbie titanium app, , learning alloy method developing.
i wrote in index.xml:
<alloy> <window class="container"> <textfield id="title" hinttext="title"></textfield> <textarea id="description" hinttext="description"></textarea> </window> </alloy> but when previewed in android emulator, showing overlapped textfields onto center of screen. default, should start top , should automatically take margin top relatively.
right showing is: i.imgur.com/kozup6k.png
you have override default alignment of window children giving layout property value vertical or horizontal, check link more explanation.
you can give text fields same class , give class top value, seek , check result in ui.
index.xml:
<alloy> <window class="container" layout="vertical"> <textfield hinttext="textfield 1" class="inputs" /> <textarea hinttext="textarea 1" class="inputs" /> <textfield hinttext="textfield 2" class="inputs" /> <textarea hinttext="textarea 2" class="inputs" /> </window> </alloy> index.tss:
".inputs": { top: 10 } android titanium titanium-mobile titanium-alloy titanium-android
Comments
Post a Comment