Text cut off for TText Controls Delphi xe5 Android - android

Developing for Android via Delphi xe5.Text on TText and TLabel controls are not displaying properly. Seems as if the last line of text is being cut short per character.
This is my issue i believe but not applicable to Delphi xe5
Android: Last line of textview cut off
Here is a QC report I found describing my issue.
http://qc.embarcadero.com/wc/qcmain.aspx?d=121356
Note: The workaround listed in the QC report does not work for me because I am dynamically creating a lot of text controls ( thus can not create in design builder ) and changing the autosize property does not do anything for me.
Any work around or way to resolve this issue? Text displays correctly for iOS, but not for Android.
Thanks !

Related

Create transparent form

I work with FireMonkey in C++Builder, and I'm trying to make a transparent form, so that the components that are on it are displayed, but in the space where there are no components you can see what is below the form (transparent)...
I have set the Transparency property of the form to true, but the areas of the form that should be transparent look BLACK.
I have searched the Internet and found solutions for Delphi, but none for C++.
I tried to include this in the manifest:
SetActivityAttribute(MYFormTransparent ,android:theme, #android:style/Theme.Translucent.NoTitleBar)
but still, the same issue.
Any ideas?
This is a known problem that was introduced in 10.3 Rio. It has already been reported to Embarcadero (unfortunately, it has been closed as "works as expected"):
RSP-22314: Transparency Property
Marco Cantu commented on that report:
Sorry for not commenting sooner. We have done some research on it for the last update, but decided to defer a fix.
The core issue (in short) is that we use Android SurfaceView and this is a limitation of that platform control (only 2 SurfaceView instances are available). We are using this platform element as it allows us to mix styled and platforms controls (a feature we introduced in 10.30). By chancing the internal implementation, the transparency become unavailable.
There is an alternative implementation of forms via TextureView, but so far our tests have shown that the speed of rendering 2 times slower, and we don't want to slow down all FMX applications on Android for this feature.
There are some workarounds, one of them is to use a frame instead of a form. It works perfectly with transparency and uses less resources than separate form.
For existing code the fast way is to add a Layout to the form and have the controls inside it. When you need to display the form with transparency you can just move Layout from the specific form to main form as a child and align it on content Align = Content.
Other commenters noted:
I tested an alternative with formStyle = popup and stylelookup = popupboxstyle
with a rectangle in the form with transparency = 0.4 and some instructions to size the form with setBounds
The result is acceptable
As said by Herve Escriou, a work around is to set your formstyle property of the form to "Popup". This will make the form transparent again. But this wil have the effect of the wsMaximized style not working properly. You can go around this by making the following code additions to your form: ...

Firemonkey: label cutting accentuation

I'm developing an app for android using Rad Studio 10.1 and I'm having trouble with a new font that I'm trying to implement into my project. The problem is, I have to use accentuation in my app because is for portuguese language users, and portuguese has a lot of accentuation. I found a good font on the internet and I want to use, but when I put into a label, the label cuts the top part of the text. An image to explain better:
As you can see, just the accentuation of the top are being cutted, should be a 'Ã'. The bottom accentuation 'Ç' are just normal, and this just happen with UpperCase texts. Someone have any idea why this is happening?
EDIT: Aditional information: The TLabel is alredy set on Client Alignment

Is there a font which supports invisible chararcter and has every character at the same size?

I'm a newbie in android developpement and ASCII art.
I made an RPG which uses ASCII art for graphics but I can't find any font which, when applied to Android :
-Supports invisible characters;
-Has a unique size for all characters, including every character in UTF-8.
Unfortunately I foud Consolas which works well on PC, not in Android.
Could you please help me?
PS - One of the concerned ASCII-arts :
ASCII art
EDIT - Nevermind, I found that Courier new works well. I just need to find another invisible character.;.

Android EditText max text length limited

I have written a simple text editor, using EditText component in Android.
It is working properly on many devices, but on an LG G Pad, text length is limited to 10500 characters ( unicode).
I have set android:maxLength="9999999" but it has no effect!
This Blog should be useful to solve this issue. Basically, use filter.
http://androidblogger.blogspot.com/2009/01/numeric-edittext-and-edittext-with-max.html

Using hebrew with the android emulator

I want to be able to run a "Hello World" application on my android emulator in hebrew
How can I do that? is it supported?
thanks
Though android does not have complete support for Hebrew if you are just displaying text, then it turns out to be pretty easy to do.
First you want to add a Hebrew font to your app. For this you simply put a true type font file (with Hebrew characters) in your assets directory. Then you load the font and use it on your view. For any view that inherits from TextView (which includes just about any view that displays text), you do the following:
AssetManager assets = getAssets();
Typeface font = Typeface.createFromAsset(assets, "hebrewfont.ttf");
view.setTypeface(font);
This will cause Hebrew characters to be visible. You may need to use the RTL mode character (\u200F) to force your text to display in the correct order. You may also need to set the gravity to right in order to right align the text.
I've found no way to get the scrollbar to appear on the left side. :( Cantilation marks to however display properly starting in android 2.2. I've tested Nequdot in all versions since 1.5, and they work as well. You may want to use some of the precombined characters, such as shuruq (\ufb35) instead of vav+dagesh (\u05d5\u05bc), as this isn't necessarily handled properly.
I have had good results with the DejaVu font, which is freely available.
Although this has been asked a long time ago, there is a native Hebrew support in later versions. The avd with API15 (Android 4.0.3) can display Hebrew nicely out of the box. I'm not sure which version is the earliest with this capability.

Categories

Resources