我正在用 Titanium 制作一个应用程序。 XML 与 Net Beans 的 XML 不同。例如:
<Alloy>
<Window>
<TextField hintText="Login"></TextField>
<TextField hintText="Password" passwordMask="true"></TextField>
<Button>Login</Button>
</Window>
</Alloy>
这会将 2 个文本字段和按钮全部放在彼此的顶部...是吗?
最佳答案
First take a look at the docs.关于如何style your views 。这些指南很有帮助。
然后尝试为您的窗口使用垂直布局,并为您的输入尝试更多定义的尺寸:
<Alloy>
<Window layout="vertical">
<TextField hintText="Login" height="40" width="Ti.UI.FILL"></TextField>
<TextField hintText="Password" passwordMask="true" height="40" width="Ti.UI.FILL"></TextField>
<Button height="40" width="Ti.UI.FILL">Login</Button>
</Window>
</Alloy>
这应该可以帮助您开始。
关于ios - 使用钛合金,我正在尝试制作一个基本的 : name password and email field. 我该怎么做?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17158636/