Quantcast
Channel: Sarina DuPont, Product Manager RAD Studio
Viewing all articles
Browse latest Browse all 132

Android KitKat Style for XE5

$
0
0

Android 4.4 introduced some selection color changes for buttons and lists. Below is a screenshot of the key differences. While you could just make those changes via the Bitmap Style Designer (Tools-Options), we are providing updated versions for the light and dark style for XE5 for KitKat.

If you own Delphi XE5 (with mobile) or RAD Studio XE5, you can download the Android 4.4 KitKat style (light and dark) as a registered user download here.

To add style support for Android 4.4 to your Android application, follow these steps:

1. Place the TStyleBook component onto your form and rename it to KiKatStyleBook, for example.

2. Load the AndroidLight.fsf or AndroidDark.fsf KitKat style to the KiKatStyleBook.

3. Create a TForm.OnCreate event, and add this code:

{$IFDEF ANDROID}

if TOSVersion.Check(4, 4) then StyleBook := KitKatStyleBook;

{$ENDIF}

Android 4.3 Light Style            Android 4.4 Light Style

Note: The code above shows you how to load and display the KitKat style at runtime only when 4.4 is running on the target device, and load the default Android style otherwise. You can also load either of the .fsf styles (light or dark) to a TStyleBook and set it on the form to use the 4.4 style on all supported versions of Android.

The zip archive also includes .vsf files which are the style templates that you can load in the Bitmap Style Designer for editing the style.

Regards,

Sarina


Viewing all articles
Browse latest Browse all 132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>