Set the FontSize Of Numbers = 30

Hello everyone.
Is it possible to set the font size of numbers for each Text = 30 and the font size of Text = 20 by using GetMetric Device Extension?

Enlarge_FontSize_Of_Number.aia (124.6 KB)

1 Like

I do not believe it is possible to change the font size of just one character, or many individual characters in a textbox. You could probably do something in html with javascript and css.

1 Like

Android provides a way to change and customize each individual characters to a text based view, maybe someone could implement it.

1 Like

I hope there is a way to implement it because I tried hard to find some way to change the font size of this character but I was not be able to do it.

1 Like

I think I know how to do it.

Wait I'll try to make an extension.

1 Like

Can you please check if this works :

ShubhamText.aix (7.6 KB)

I can't test it at the current moment.
The Button related components may not work but the Label and Checkbox components should work.

Show an example for relative size (what are the parameters for this - is it a font size) and for htmlColor - is this a color block/a color name or a hex value ?

1 Like

grafik

grafik

1 Like

But it seems that relativeSize can only be an integer.

1 Like

Yes. Does that have any problem ?

I'll update it and publish it tomorrow.

2 Likes

Not working here for a Textbox.....(works for a label - but could have done that with html)

image

1 Like

Yes, I already tried it:

1 Like

Osama was after changing a character in a TEXTBOX :wink:

1 Like

I think Osama could use labels instead of textboxes, his textbox is readonly.
Rather I wonder what he can do with a multiline textbox or a label.

2 Likes

Thanks @Anke for the help in debugging. I've Solved both and will upload it after I solve the TextBox thing, if possible. Have to dig out through many sources. :sweat_smile:

I didn't notice it was a texbox, sorry.

Waste in Haste.

Thank you all for helping me!
I hope you can find the solution [SHUBHAMR69]

1 Like

@Anke and @TIMAI2

Could you please test this version.

ShubhamText.aix (7.7 KB)

Not 100 % sure if it will work, but it should, because EditText extends TextView.

The only next option that I know for now, is SpannableStringBuilder.

My Internet Quota is exhausted so I'm having problems in connecting, so I can't test.

Edit : The toIndex property was taking one less index fixed it and updated this post.

2 Likes

Yes, it seems to work now also with TextBox.

1 Like

Yes, this seems to work.....

Observations

  1. cannot set a smaller relative size once a larger one is set, without resetting the textbox :frowning:
  2. relative size accepts decimals - e.g. 1.25, 1.5 :slight_smile:
  3. Allows for setting of multiple selections, with different sizes :slight_smile:
1 Like

Maybe using SpannableStringBuilder might solve this. Wait a while.