Easily customize your mobile UI in XE6
For example, if you have a TSpeedButton selected with StyleLookUp = actiontoolbutton, you will see a Tint property in the Object Inspector called IconTintColor since this style element consists of a glyph.

For text based buttons, such as StyleLookUp = listitembutton, you can change the TintColor and also the Font Color. In the case of iOS 7, this will adjust the outline color of the transparent button (and fill color when the button is clicked) and on Android, it will change the fill color. For your font, you can also adjust the color depending on the button state (i.e. focused, pressed etc.).

Using the new Tint support allows you to quickly change the user interface theme of your mobile applications without editing style files.


Comments
-
sarinadupont Friday, 23 May 2014
Hi Marcio,
I would recommend looking at the following videos:
http://www.youtube.com/watch?v=-ZGAuE3bRzs
http://www.youtube.com/watch?v=UsBfIi4ofak
You might also find these links useful:
http://blogs.embarcadero.com/sarinadupont/2013/08/26/cooking-with-interbase-on-android-and-ios/
http://docwiki.embarcadero.com/RADStudio/XE6/en/Mobile_Tutorial:_Using_dbExpress_and_SQLite_%28iOS_and_Android%29
http://docwiki.embarcadero.com/RADStudio/XE6/en/Mobile_Tutorial:_Using_FireDAC_in_Mobile_Applications_%28iOS_and_Android%29
Regards,
Sarina -
Ogredson Lavor Sunday, 25 May 2014
Hi Sarina, I am enjoing your tutorials and i have tested all of then and they work very well. I´m using the trial XE6 and i am loving it!
I have a piece of code using "BackendFiles" with Kinvey that makes an upload of a photo file. The piece of code is this:
var
AFile: TBackendEntityValue;
Stream: TFileStream;
begin
Stream := TFileStream.Create('c:\temp\foto.jpg', fmOpenRead);
try
BackendFiles1.Files.UploadFile('foto.jpg',Stream, 'application/json',AFile);
finally
Stream.Free;
end;
end;
This works ok!! The file goes to server. But how can I download the file back to my computer using Baas components? I use Backandfiles again? how?
If am not boring you could you please help me?
Thanks so much and Best Regards -
sarinadupont Tuesday, 27 May 2014
Hi Ogredson,
Glad to hear you like the tutorials. Below is some sample code to show you how to upload an image, download the image and then assign the image.
Upload Image Code:
procedure TDataModule1.UploadImage(const AFiles: TBackendFilesApi; const AStream: TStream;
const ARecipe: TRecipe);
var
LFile: TBackendEntityValue;
begin
Assert(AFiles nil);
AFiles.UploadFile('recipeimage.png', AStream, 'image/png', LFile);
ARecipe.ImageURL := LFile.DownloadURL;
ARecipe.ImageFileID := LFile.FileID;
end;
Download Image Code:
procedure TDataModule1.DownloadImage(const ARecipe: TRecipe);
var
LStream: TMemoryStream;
begin
if ARecipe.ImageURL '' then
begin
LStream := TMemoryStream.Create;
try
try
REST.Client.TDownloadURL.DownloadRawBytes(ARecipe.ImageURL, LStream);
except
// Ignore download errors
end;
ARecipe.SetImage(LStream);
finally
LStream.Free;
end;
end;
end;
Assign Image Code:
procedure TRecipe.SetImage(const AStream: TStream);
begin
if FBitmap = nil then
FBitmap := TBitmap.Create;
FBitmap.LoadFromStream(AStream);
end;
Regards,
Sarina -
Please login first in order for you to submit comments
- Page :
- 1
Hello Sarina,
I saw a video her and David I, where you explained about using to TPath for IOS and Android, using XML, CDS and SQLITE.
But I do not remember where, do not know if it was in coderange, you remember this video, you know where can I find it?
thank you