Jump to content

Recommended Posts

  • Administrators
Posted

Download:
The distributive is available by request only.

Release date:

21 November 2021


New

We added two new components-container TfgVirtualPagerLayout and TfgPagerLayout. Both of them are intended for alignment children controls by pages. Switching pages is done by scrolling through the pages with your finger.

TfgVirtualPagerLayout

It's a basic component, which is designed to dynamically load/unload pages as needed. Unlike the usual approaches with the addition of nested components in advance in the designer, this component requests the loading/unloading of the page through the OnLoadPage and OnUnloadPage events as needed. This means that in fact, instead of loading 10-20 pages, it loads only the visible one and 1-2 more adjacent ones, depending on the current state of the component.

Before using it, you need to write handlers for 3 events:

  • OnGetPageCount - return the total number of pages in the component.
  • OnLoadPage - it is necessary to return the page component (any descendant from the TfgControl). You can create a page in this event dynamically, or you can implement a pool of objects to reuse unloaded pages.
  • OnUnloadPage - you can destroy the page or return the page to the page pool for further reuse.

Thus, this component allows you to speed up the loading of the application by loading only the necessary pages, and not all at once. Based on this component, you can easily implement an image slider with a large number of images and much more.

This component offers a wide range of optional events that allow you to fully control the process of changing tabs:

  • OnChanged - It is called only when the tab is changed interactively, as soon as the component understands which tab the user is finally switching to. 
  • OnBeginDragging - Called when the user puts his finger on the screen and starts moving the content.
  • OnEndDragging - Called when the user lifted his finger from the screen and finished moving the content.
  • OnBeginScrolingAnimation - Called when the tab change animation has started.
  • OnEndScrolingAnimation - Called when the tab change animation is over.

All the details of the use can be found in the article:

  • Demo sample: "Components" -> "TfgVirtualPagerLayout" -> "Basic Sample"
  • Demo sample: "Components" -> "TfgVirtualPagerLayout" -> "Pages Pool"
  • Demo sample: "Components" -> "TfgVirtualPagerLayout" -> "Photo Slider"
  • Details.

TfgPagerLayout

This container component is built on the basis of TfgVirtualPagerLayout and unlike TfgVirtualPagerLayout aligns all components added to it by pages. It does not unload/load pages and is essentially an analogue of TfgPageControl. You add any components to it and TfgPagerLayout itself performs their alignment and switching.

System status bar

Added the ability to change the hue of the contents of the system status bar using the new TfgForm.SystemStatusBar.ResultContentStyle property.

Previously, on some customized versions of Android, the system status bar was completely transparent by default (for example, on MIUI), now the system status bar is always by default.

Fixed the form layout when hiding the system status bar on Android 11.

Improvements 🙌

The translation "android.content.SharedPreferences*" Java classes was added to "Android.Api.ActivityAndView" (Android).

Bug Fixes 🐛

  • Like 2
×
×
  • Create New...