Android Question Changing the number format of a label

Voodoodan

New Member
Licensed User
Longtime User
Hello,

This must be the easiest thing in the world, but being a newbie this is frustrating!

I have created a label in designer and the following is in Sub Globals:

B4X:
Private Label1 as label

In Activity_Create(FirstTime AsBoolean)
B4X:
label1.text=0

In imageView1_Click I've got:
B4X:
label1.text = label1.text + 1

When I click the image button the number increases by one each time but shows "1.0", "2.0", "3.0", etc.

I just want to show this as 1,2,3, etc. I'm sure this is done with numberformat, but I'm not sure how to do this.

Is there anyone that can assist, please?

Many thanks,
Dan.
 
Last edited:
Top