Jump to content

Recommended Posts

  • Administrators
Posted

Download:
The distributive is available by request only.

Release date:

10 April 2022


Warning 🚨

Properties TfgCollectionView.SelectionColor, SelectionColorName and SelectionMode were moved to new SelectionOptions property. At the same time, the old runtime access to them is still preserved.

New

TfgGoogleSignInAuthenticationClient

The new component TfgGoogleSignInAuthenticationClient was added. It allows to identify user via "Google Sign in" service. The component is also cross-platform. However the component is implemented only for Android platform at this moment.

TfgCollectionView - manual selection displaying

The manual selection displaying was added in TfgCollectionView. The new property TfgCollectionView.SelectionOptions.DisplayingMode allows to specify way for displaying selection:

  • Auto - regular mode by default. The component takes care about displaying selection via changing item's background color.
  • Manual - manual mode. The component doesn't display selection. It notifies user about displaying/resetting item's selection via new event OnUpdateItemSelectionAppearance.

In case of manual displaying selection, you should select or reset selection appearance in the OnUpdateItemSelectionAppearance event. This event is called every time the list needs to update the state of an item. Among the arguments of the event, information about:

  • AItem - Item wrapper for working with nested controls.
  • IsSelected - Is selected item or not.
  • Initiator - Who is initiator refreshing selection appearance. If you want to add animations to the selection process of an element, then focus on this flag. This flag equlas "User" when the user changes the selection manually.

The new demo sample was added: "Components" -> "TfgCollectionView" -> "Manual displaying selection".

TfgControlEnumerators

Two enumerators are now available for traversing the component tree with the ability to manage the traversal. Both enumerators are available in the TfgControlEnumerators class.

  • TfgControlEnumerators.Enum - Root -> First..Last child
  • TfgControlEnumerators.ReverseEnum - Root -> Last..First child

For example, iterating over all `TfgEdit` might look like this:

TfgControlEnumerators.Enum(Form,
  procedure (const AChild: TfgControl; var AAction: TfgEnumControlsAction)
  begin
    if AChild is TfgEdit then
      TfgLog.Debug(AChild.ToString);
  end);

In addition to the usual bypass, it is possible to do a controlled bypass. For example, searching for an input field:

TfgControlEnumerators.Enum(Form,
  procedure (const AChild: TfgControl; var AAction: TfgEnumControlsAction)
  begin
    if AChild is TfgEdit then
    begin
      TfgLog.Debug('Edit: ' + AChild.ToString);
      AAction := TfgEnumControlsAction.Stop;
    end
    else
      AAction := TfgEnumControlsAction.Continue;
  end);

The `AAction` parameter of an anonymous function allows specify the further direction of the component traversal action:

  • Continue - Go to next control;
  • Discard - Go to sibling component (don't go deep);
  • Stop - Stop.

Components icons

We have added new component icons for all components in "FGX: Standard" and "FGX: Layout" groups.

Improvements 🙌

TfgFormManager

  • The form manager TfgFormManager was redesigned. This class fully tracks the lifetime of all forms in FGX Native. Now all public methods do not take into account embedded form-frames, as before.
  • Added a new demo project showing an example of working with authentication clients (TfgAppleIdAuthenticationClient, TfgFacebookLoginAuthenticationClient😞 "Authentication" -> "Authentication clients".

Other

The key event processing logic was redesigned. Now the key event is dispatched across all forms/frames, starting from the one closest to the user. Previously, depending on the moment of creation and embedding of the form, the order of processing button events could be violated.

Bug Fixes 🐛

  • Like 1
×
×
  • Create New...