BlackBerry Application Developer guide ui api management UI components (1)

Source: Internet
Author: User

We undertake the previous article "ui api display UI components". This article describes how to manage UI components.

Manage UI Components

Manage Layout

Use the BlackBerry API layout manager to arrange on-screen components.

The following four classes extend the Manager class to provide a predefined layout Manager:

◆ VerticalFieldManager

◆ HorizontalFieldManager

◆ FlowFieldManager

◆ DialogFieldManager

By default, both MainScreen and FullScreen use a VerticalFieldManager. Only defining a layout manager instance for these classes provides different la S.

Note: to create a custom layout Manager, expand the Manager.

Define the layout manager for a specified Screen instance and complete the following operations:

◆ Instantiate an appropriate Manager subclass.

◆ Add the UI component to the layout manager.

◆ Add the layout manager to the screen.

The Manager class defines constants of multiple system styles that define actions such as scrolling and alignment. Use these styles as parameters when creating a layout manager.

Vertical organization field

VerticalFieldManager vertically organizes fields. All fields start on a new line. The Manager. VERTICAL_SCROLL parameter is provided for vertical scrolling.

By default, BitmapField objects are left aligned in VerticalFieldManager.

Horizontal organization field

HorizonFieldManager horizontal organization field. Provides the Manager. HORIZONTAL_SCROLL style for horizontal scrolling. If the HORIZONTAL_SCROLL parameter is not included, fields can be horizontally arranged by themselves, which may exceed the screen width, but the user cannot scroll beyond the content on the right of the screen.

The BlackBerry device does not display a horizontal scroll indicator or scroll bar.

Horizontal and vertical organization Field

FlowFieldManager organizes fields horizontally and then vertically. Organize fields horizontally until there is not enough space for another Field, and then arrange them horizontally on the next line. Home Screen is an example of FlowFieldManager.

Specify the layout of a PopupScreen

DialogFieldManager specifies the layout of the PopupScreen object. It manages an icon, a message, and a customized field Layout. The icons and messages are close to each other at the top of the layout, and the Custom field appears at the bottom of the message. This layout is the standard layout of PopupScreen objects. To create a custom dialog box, expand DialogFieldManager.

By default, BitmapField objects are left aligned in VerticalFieldManager.

Horizontal organization field

HorizonFieldManager horizontal organization field. Provides the Manager. HORIZONTAL_SCROLL style for horizontal scrolling. If the HORIZONTAL_SCROLL parameter is not included, fields can be horizontally arranged by themselves, which may exceed the screen width, but the user cannot scroll beyond the content on the right of the screen. The BlackBerry device does not display a horizontal scroll indicator or scroll bar.

Horizontal and vertical organization Field

FlowFieldManager organizes fields horizontally and then vertically. Organize fields horizontally until there is not enough space for another Field, and then arrange them horizontally on the next line. Home Screen is an example of FlowFieldManager.

Specify the layout of a PopupScreen

DialogFieldManager specifies the layout of the PopupScreen object. It manages an icon, a message, and a customized field Layout. The icons and messages are close to each other at the top of the layout, and the Custom field appears at the bottom of the message. This layout is the standard layout of PopupScreen objects. To create a custom dialog box, expand DialogFieldManager.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.