Kaarigar

Member since: Thursday, 04 September 2014
Last login: 4 years ago
Profile viewed: 966 views

Your Rank: 85
Points: 9

Kaarigar replied to the topic 'How to copy animated gif to album (camera roll)?' in the forum. 4 years ago

Emailx45 wrote: See in HELP SYSTEM:

FMX.Graphics.TBitmap.LoadFromFile
docwiki.embarcadero.com/Libraries/Berlin...TBitmap.LoadFromFile

FMX.Graphics.TBitmap.LoadFromStream
docwiki.embarcadero.com/Libraries/Berlin...itmap.LoadFromStream

FMX.Graphics.TBitmapCodecManager
docwiki.embarcadero.com/Libraries/Berlin...ported_Image_Formats

  // I believe that works because GIF is supported (to Android) by LoadFromFile() / LoadFromStream() on ShowShareSheetAction.Bitmap properry
  //
  ShowShareSheetAction.Bitmap.LoadFromFile( pathInAndroid + 'filename.gif');  
Thanks - I had already looked into these help pages. None of them talk about animated gifs - which contains multiple bitmap data (for each animation frame), so I understand why it doesn't work as expected. I guess these LoadFrom* methods are designed for loading data from a single image - which is understandable. Perhaps what I need a means to share a document - I can use that to share the animated GIF. But I didn't find a way to share document in the Embarcadero help. Is there a way to share documents in Delphi?



Read More...

Kaarigar created a new topic ' How to copy animated gif to album (camera roll)?' in the forum. 4 years ago

My app creates animated GIF programmatically. The animated gif is saved in the app's private storage. How can I share this image or copy it to the device's album or camera roll? I have tried to use TShowShareSheetAction object, but it only accepts a single bitmap to share - while in my case the animated GIF doesn't have a single bitmap. I am using TBitmap.LoadFromFile() to load the bitmap from the animated gif file. But it reads only the first bitmap. As a result, when the image is shared, it has a single frame, and does not animate.

Is there a solution for this problem? How can I copy or share the entire animated GIF file contents? I will really appreciate any help on this. Thank you in advance.

Read More...

Kaarigar replied to the topic 'Android: cannot open file - No such file or directory' in the forum. 4 years ago

Probably ite requires read permission in the "USer Permissions" in the options? I have the "Read external storage" set to true. Also make sure that the filename used in the code to open is the same case as the actual filename on device.

Read More...

Kaarigar replied to the topic 'Android: cannot open file - No such file or directory' in the forum. 4 years ago

Yes, I had checked that the apk file deployed on the device did contain the file in questions. As I reported, it was my error - I was trying to open a file that wasn't matching case wise with the actual file. Once I fixed that, I was able to access the file.

Read More...

Kaarigar replied to the topic 'Android: cannot open file - No such file or directory' in the forum. 4 years ago

It was my mistake - I had overlooked that the filenames are case sensitive on android. That caused this error.

Read More...

Kaarigar created a new topic ' Android: cannot open file - No such file or directory' in the forum. 4 years ago

In an android app, I am trying to open a text file. The text file is already added to the deployment in the assets\internal\ folder. However, when I run this app on the device, I always get the error the

"Cannot open file "/data/user/0/com.embarcadero.myapp/files/StringLines.txt No such file or directory
..... In the code I am using call to
stringlines.LoadFromFile(System.IOUtils.TPath.Combine(System.IOUtils.TPath.GetDocumentsPath, 'StringLines.Txt'));

to properly open the file. Why am I getting this error? Is there some project setting that I have to tweak to make this happen properly. This is very frustrating. I will really appreciate if someone can point me to the right solution for this problem I am facing. Thank you.

Read More...

Kaarigar created a new topic ' How to create animated GIF in ForeMonkey' in the forum. 4 years ago

I need to create animated GIF using the bitmaps that I have in memory. How can I create animated GIF using these bitmaps? Thank you.

Read More...

Kaarigar replied to the topic 'How to target a particular Android SDK' in the forum. 5 years ago

Can anyone please help with this question? Is there any extra documentation on configuring android development? I have followed all the directions which I find in the documentation. Thank you!

Read More...

Kaarigar created a new topic ' How to target a particular Android SDK' in the forum. 5 years ago

I have several Andorid SDKs installed - 22, 27, 28, and P. However I only see Andoid 25.2..5 32 Bit in the SDK Versions in the Tools->Options->SDK Manager->SDK Versions. Do I need to do some more configurations to make others appear in the SDK Versions? Thanks!

Read More...

Kaarigar created a new topic ' Fit text inside a rectangle with largest font' in the forum. 8 years ago

I have a rectangle and a string. I want to render this string inside that rectangle using a particular font with the largest font size possible without overrunning the rectangle boundary. The string can be word-wrapped (i.e. multi-line) however the string itself doesn't have the line-break characters embedded in it.

How to accomplish this?

I have tried to solve this problem using a TRectangle and a TLabel. I use the Canvas.TextWidth and Canvas.TextHeight to calculate string extents and iteratively incrementing the font size till I get a font size that is just large enough. While this works on certain device (such as android or iPhone), it fails on iPad - the text overflows fro the rectangle. I think this has something to do with the Canvas.Scale (hi-res device vs. low-res device) but I can't figure out what the relation between Canvas.TextWidth/Height has with the Canvas.Scale.

Can you share your thoughts if you have worked on a similar or same problem? Thanks!
Read More...

Kaarigar replied to the topic 'how to change the fontcolor of a label?' in the forum. 8 years ago

shuiwang wrote:

i want to change the fontcolor of a label by TAlphaColor(TAlphaColorRec::Green); but it doesn't work , how can i do??

eg: label->TextSettings->FontColor = TAlphaColor(TAlphaColorRec::Green);
Make sure you uncheck the StyledSettings->FontColor. Unchecking it will allow you to override the font color.
Read More...

Kaarigar replied to the topic 'Where are the Delphi forums?' in the forum. 8 years ago

Warren wrote:

I totally agree. And there were specific forums before for Component Authors, for Third Party Component Discussions, and a dozen other really useful sub-forums beneath it.
I for one don't believe old forums are coming back at all. David I. in yesterday's XE7 webinar was asked the same question that we are discussing here and he said going forward the community.embarcadero.com is the place for all discussions, questions, etc.

Embarcadero, in their infinite wisdom starts promoting new forums (or answers, of stackoverflow clone, or whatever) while simultaneously unable to maintain the old forums even in read-only mode. This is a big problem because even Google points to threads on the old forums when it is used for searching for answers. At least they should create enough categories here for people to know where to post questions. Also, what the hell is answers and forums? Which one will I pick for what posting questions? Sometimes I may want answer to question - so there will not be no discussions happening on the answers? Can a question be answered without any discussion?
Read More...

Kaarigar started a new discussion Where to post questions?... 8 years ago

Just learned from the XE7 webinar that original embarcadero forums are being replaced by this Answers forum So, where should I file questions about different categories that were on the forums - such as Delphi, Firemonkey, etc.?...

Kaarigar started a new topic Fit text inside a rectangle with largest font in UI with tag Ios 2025 years ago

I have a rectangle and a string. I want to render this string inside that rectangle using a particul

Kaarigar started a new topic Fit text inside a rectangle with largest font in UI with tag Ios 2025 years ago

I have a rectangle and a string. I want to render this string inside that rectangle using a particul