| |
|
|
| |
Sumário |
|
| |
» Controles modificados para ter a nova aparencia: pop up window, button, combo box, radio, check box, progress bar, MessageBox, edit, multi edit, list container, grid, tabbed container.
» Novos controles: spinner, progress box, title bar, numeric pad, button menu, page position, pop-up menu
» Novas funcionalidades: auto-start no Android, flick e drag em varios controles, componentes com mesmo tamanho fisico, independente de resolução ou densidade da tela, robo para gravar e reproduzir eventos diretamente no dispositivo, possibilidade de embutir a vm junto com a aplicação, suporte ao Google Maps.
|
|
Os changelogs estao disponiveis no menu ao lado, e as versoes 1.3 a 1.5 referem-se ao novo estilo Android.
Os textos a seguir são em ingles.
» The default font is now generated inside an Android emulator. We did this because the Android's internal engine for rendering the True Type Font is better than Java's and even Windows'. We also changed the generator to make sure that the Font size specified in the constructor is equal to the FontMetrics.height member (in the old font this was not true). Note that if you plan to use the new font, your application may change a bit since the fonts characters are not equal in height nor in width.
» Since the begining of SuperWaba, and then TotalCross, the relative positioning allowed an adjustment, like LEFT - 5, TOP+3, etc. The adjustment value was always in pixels. However, a single pixel can have several sizes in the currently available devices, depending on the screen density. Since now the default font size depends on the screen density and not exactly on the resolution, we created a way to make the adjustment be a PERCENTAGE of the FONT HEIGHT. To enable this in your application, do "Settings.uiAdjustmentsBasedOnFontHeight = true". So, instead of LEFT-5 (to place at left - 5 pixels), use LEFT-50 (to place at left - 50% of the font's height), TOP+10 (TOP + 10% of the font's height), CENTER+150 (CENTER + 150% of the font's height), and so on. This way, we can ensure that the distance will be proportional for all screen densities and resolutions. With this flag on, all adjustments and places in the user interface that uses pixel are transformed into percentages, including Insets.
» Completely rewritten UIRobot class. The events are recorded in the device, and pen and key events are recorded. The robots are saved in a .robot file that can be replayed later in sequential or random order. In desktop press control+1 to activate the robot menu. To enable it at the device, assign the Settings.deviceRobotSpecialKey to some device key so it can be invoked. When you finish the recording, a screenshot of the screen is taken and saved to a PNG, so when you replay the robot the final result is compared to see if the robot succeed.
» There are some new controls and changes in others:
» ListContainer.Layout and ListContainer.Item: makes the creation of containers with Labels and left and/or right controls or images much easier. See the ListContainerTest for a sample.
» ButtonMenu: a class that allows the creation of a Button matrix (like PushButtonGroup), but allows scroll, which can be horizontal or vertical. When horizontal, the flick is done a page at a time. The button's image are resized automatically.
» CalculatorBox: now its a simple calculator; may also be used as a numeric pad without operators (see Edit.KBD_NUMERIC). You can replace the CalculatorBox by the numeric pad when the Edit is in CURRENCY mode by doing Edit.useNumericBoxInsteadOfCalculator = true.
» MessageBox now can have an icon (image) at left, set with the setIcon method. The icon is resized to the font's height.
» Spinner: shows a spinning wheel, to tell the user that some lengthy task is running. The wheel is updated in a thread.
» ProgressBox: a MessageBox with a Spinner
» When Settings.fingerTouch is true (default in Android and iPhone, but can be set to other platforms as well), some changes are made in the user interface:
» The Grid, ListBox, MultiEdit, ScrollContainer, TabbedContainer and Tree can be flicked using the finger (press, drag and release the finger).
» When these containers are flicked, a ScrollPosition control is used to indicate the position. By default, this control appears only when a flick starts; this behaviour can be controlled using ScrollPosition.AUTO_HIDE static flag.
» New user interface style, Android. Set it in the application's constructor using: setUIStyle(Settings.Android). The control appearance is rounded and shaded, just like a Vista style with round corners.
» The Android style uses a set of images that are divided into 9 parts: the four corners, the four sides and the middle, and are rendered by the NinePatch class. These images are then sized and colorized based on the control's properties. This is hidden for the programmer; the user interface takes care of everything.
» Since several images are held in a cache to improve performance, if you feel that the program is running out of memory, call the totalcross.res.Resources.flush method. Note that calling it often will decrease overall program's performance.
» If the Window border style is set to ROUND_BORDER and the title is empty (""), then the title bar will be removed.
» Window set to ROUND_BORDER can have 3 distinct areas: the header, the midle and the footer. The header and the footer colors are defined in the headerColor and footerColor fields. If the three are the same (or have the default -1 value), then a line is drawn to separate and distinguish the areas.
» A Container can have a shaded gradient background, controlled by the backgroundStyle field.
» Added MainWindow.getScreenShot, to get an image of the current MainWindow.
» Image.getSmoothScaledInstance uses the Catmull-rom resize algorithm, which leads sharper images when compared to the old area-averaging.
» When a standard ComboBox opens, the items are shown inside a ButtonMenu instead of the ComboBoxDropDown window.
» Bar: a container that can be placed at the top or at the bottom of the screen, with a title and/or a set of icons.
Most enhancements are shown in the AndroidUI samples.
|
|