2016年10月30日星期日

Delphi 10.1 Berlin Icons&Splash Screen Generator

Generate all Icons&Splash Images needed for Delphi mobile Apps at one click!
With Bitmap and Vector support!

2016.11.02 Fixed: Transparent color are not properly exported sometimes 2016.11.04 Remove UPX compress. There is no false report of antivirus anymore.
2016.11.08 Add SVG support

Download:

https://drive.google.com/file/d/0BwdfodaqQm4pR1VpUDM3YnJBUjA/view
Some antivirus have false report. If worry about that, you can run it in VMWare.



2016年10月25日星期二

The most beautiful Firemonkey Style in my eyes

I extract the stock IOS6 style and remove the platform restriction.

I think it's the most beautiful one.

Here is the download:
https://drive.google.com/file/d/0BwdfodaqQm4pN2ZpbVphRnZ4c3M/view?usp=sharing






2016年10月24日星期一

Custom TSwitch style in Firemonkey

1.Firstly, Copy the following DFM string to StyleDesigner
object TSwitchObject
  StyleName = 'IOSSwitchStyle'
  Align = Center
  Kind = FadingTracks
  Size.Width = 78.000000000000000000
  Size.Height = 35.000000000000000000
  Size.PlatformDefault = False
  TabOrder = 0
  TrackingThumbScale = 1.179999947547913000
  Fill.Color = claWhite
  FillOn.Color = xFF4CD964
  FillOn.Kind = Solid
  Stroke.Color = xA3C6C6C8
  Thumb.Color = claWhite
  ThumbStroke.Color = xA3C6C6C8
  ThumbStroke.Cap = Round
  ThumbStroke.Dash = Custom
  ThumbStroke.Join = Round
  Shape = Oval
  FixedWidth = 55
  FixedHeight = 30
end


Then Set these properties
  StyleName = 'IOSSwitchStyle' name of the style,if set to switchstyle,all the TSwich in application will apply this style by default
  Kind = FadingTracks kind, one is fading and one is cliping
Fading:
Background color change when thumb slide to center. Default effect of IOS:
Clipping:
Background is clipped by the thumb:
  TrackingThumbScale = 1.179999947547913000 X scale when clicked.
  Fill.Color = claWhite Background color when OFF.
  FillOn.Color = xFF4CD964 Background color when ON.
  FillOn.Kind = Solid Fill kind when ON.
  Stroke.Color = xA3C6C6C8 Border color.
  Thumb.Color = claWhite Thumb color.
  ThumbStroke.Color = xA3C6C6C8 Thumb border color.
  Shape = Oval shape
  FixedWidth = 55 
  FixedHeight = 30 

Then we can set StyleLookUp in Object Inspector:

The above style is vector style, if you want to use bitmapstyle, use TBitmapSwitchObject instead.(Look at the stock style).

This is our style:





But there is a bug in TBrush. TBrushKind.bkGrab is missing. For the lock icon in the demo, we can only use Bitmap, can't use vector.(e.g. TPath). It will blur on different resolutions.(In the following image, the top image is vector(TLayout contains TPath and TCircle ) , flowing is bitmap).

Please vote here to let emb fix the bug:


Demo Download: https://drive.google.com/file/d/0BwdfodaqQm4pOVFWS1NMdTNacFk/view?usp=sharing


[Guide] How to use dynamic library on Android in Delphi?

1. Create two Multi-Device applications. One as host App, one as dynamic lib.

2.  Run the Dynamic Lib project (no need to connect your phone).
3.Open Android\Release\AndroidLib\debug folder of your dynamic lib project, there is a libAndroidLib.so. This is the library file, as DLL on windows.
4.Switch to HostApp.
5.Open Project Deployment, Add the so file above, set a proper Remote Path.
6.Then run HostApp. Use LoadLibrary load the .so file. And use GetProcAddress to get the exported function.

By:Chang

Here is the Demo:
https://drive.google.com/file/d/0BwdfodaqQm4pNlRTR3hvb1R0a0E/view?usp=sharing