Vote UpVote

Loading the app’s icon into a TImage on Android

Delphi Haven – Working with Delphi for Android, I wanted to load my app’s icon into a TImage. Here’s the code I came up with: uses AndroidApi.JniBridge, AndroidApi.Jni.App, AndroidApi.Jni.GraphicsContentViewText, FMX.Helpers.Android, FMX.Surfaces; function GetAppIcon(Dest: TBitmap): Boolean; var Activity: JActivity; Drawable: JDrawable; Bitmap: JBitmap; Surface: TBitmapSurface; begin Result := False; Activity := SharedActivity; Drawable := Activity.getPackageManager.getApplicationIcon(Activity.getApplicationInfo); Bitmap := TJBitmapDrawable.Wrap((Drawable as ...
Favorite? Off-Topic? Chris Rolliston @ 2014-01-18 14:47


Visits: 718
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)