SmartDevicesPlus 6 New API Features

SmartDevicesPlus Utils

More options were added to WorkWithPlus for Native Mobile APIs

  • GetPixelsFromDips: Converts a size from dips to pixels, considering current device screen density.
  • GetDipsFromPixels: Converts a size from pixel to dips, considering current device screen density.
  • GetScreenWidth: Returns current device screen width in pixels.
  • GetScreenHeight: Returns current device screen height in pixels.

 

Resources utils

SmartDevicesPlus provides a toolbar to simplify working with .png images with different densities in GeneXus.

To access these options, user has to right clic over any image:

sdp_imagetools_toolbar

  • Generate image for densities: This option will generate all the variants of the image for any of the de missing densities (ldpi, mdpi, hdpi, xhdpi and xxhdpi)

  • Generate images with size: This option will generate all the variants of the image for all the densities (ldpi, mdpi, hdpi, xhdpi and xxhdpi), making sure that all images measure exactly what the user inputs, in dips.

  • Compress image: This option will compress the image, without losing image resolution. This is done using the pngquant library 

 

Android adaptive icon

New properties were added in SmartDevicesPlus settings that will enable the use of Android's adaptive icons.

sdp_settings_androidadaptive_sample   sdp_settings_androidadaptive_sample2

To enable adaptive icons, user must define the properties:

  • Android's adaptive icon color: This property is used as the background color for the icon.
  • Android's adaptive icon image: This image will be used as the icon foreground image.

sdp_settings_androidadaptive