0

I am new to Titanium. Trying to design a 'Contact US' tab for Android app using Titanium Classic.

Initialized a View for the tab. Have filled the 1st half of screen space with Google Map, works fine.

After that i want to put -

Contact 24x7 - PhoneNumber [Call Button].

Email - email_id@mycompany.com [Email Button]

Now, i have set the layout of main view as Vertical, so that Maps and other items align vertically, which is what i want, but phone number and call button should be on the same line.

Implementing using top, left is not what i want as screen sizes vary a lot. Is there a way to implement a HBOX so that i can add label and the button in the HBox and then add them to the view.

Alternate question: How can i make the Phone number and Email ID as clickable text? so that on clicking them i can launch the dialpad or open the email app.

Thanks in Advance.

Regards, Saurav

4

1 回答 1

0

要创建 HBOX,您应该能够执行与创建 VBOX 相同的操作。即用 layout="horizo​​ntal" 创建一个新视图,并在其中添加标签和按钮。可以将这个新视图添加到您原来的垂直视图中,使其按您预期的方式流动。

至于您的替代问题,这也是可能的。如果您查看 Labels 和 TextAreas 的 autoLink 属性,您将看到各种选项:

http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.Label

希望有帮助

于 2013-09-30T10:24:46.537 回答