Set the FontSize Of Numbers = 30

Could perhaps do with a reset function?

1 Like

Example on Osama's numbers

image

image

1 Like

grafik

1 Like

Ok Adding that. But at this moment it will reset only the last used component.

fromIndex (included) toIndex (excluded):

1 Like

Added the Reset() function.

@TIMAI2 Is it working ?
@Anke I tried to solve this one too, please check once more.

Much thanks to both of you. :smiley:

ShubhamText.aix (8.1 KB)

Much thanks to all of you. :smiley:
I will try it now and let you know SHUBHAMR69

1 Like

I tried it and there is a message Runtime Error

image

This is my trying block

1 Like

Yes, there is a problem...

1 Like

I don't get this error.


Anke
would you please show the blocks you have

Probably this one should not give the error.

ShubhamText (1).aix (8.1 KB)

I know the places where the error could occur, this change wont give an error atleast.

Unfortunately, it shows the same error message

Setting works OK....

Resetting

1 Like

That should have been a compilation error. Don't know why it was runtime.

Reset try no. 3

ShubhamText (2).aix (8.1 KB)

No error but no reset.

Need to take a timeout and iron out all the bugs before representing....

1 Like

@TIMAI2 Do you think you can help in the code ?

The part that stores a String is :

lastText = textview.getText().toString();

lastText is a String, textview.getView() returns a SpannableStringBuilder, the toString() method converts it to a string.

First line of the reset function.
Here, the String is converted to a CharSequence.

text = (CharSequence)lastText;

text is a CharSequence.

Here, the object is made.

ss = new SpannableStringBuilder(text);

ss is a SpannableStringBuilder.

These are the only places where the problem can occur.

Other parts are working fine. (According to me.)

Does the toString() method somehow copy the styling too ?

Do you need to clear what was previously set in terms of styling ?

SHUBHAMR69 If you can design an extension to change the size of font for only the ten digits from ( 0 - 9) and the two brackets between the digits


I hope you can do it SHUBHAMR69

1 Like

No. I don't need to clear anything. I just set the styling, which automatically removes the previous styling.

Also, after many attempts to connect to the Companion, I got connected for almost half a minute.

I found out that we can easily reverse the text size.

For example, try setting relative size to 2 and then 0.5

[Couldn't check the reset() function. Got Disconnected.]