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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -