Hi all,
I'm sort of getting in at the deep end (for me at least) a bit too quickly but I thought I'd ask for help on this before I continue with the beginner's guide.
I'm making a simple price calculator. Please see the attached image of how it will look more or less.
You can see three lines of numbers at the top half of the screen. The user will input values under pack size, unit size and price and the app will calculate the final figure in the right column. I'll call these figures the 'user inputs' for this post to make it easy to refer to them.
I want to use the keypad you can see in the image, rather than the android keyboard, so I have set the 'user inputs' as label views rather than edit text views. I thought it would be a very simple task to let the user touch one of the user inputs (i.e labels) and within b4a code be able to simply detect which label was touched. However, having read up on it, it would seem I was mistaken!
I understand using the reflection library makes it possible to detect when a user touches a label. I've searched for a simple tutorial on here as to how to do this but I can't find anything. I read the document (on the Wiki I think) relating to the reflection but it goes way over my head and uses jargon I do not understand yet.
So I was hoping somebody might tell me the basics if how I can detect which label is touched using Reflection.
I have given each label a different name and a different tag. I need to be able to refer to the labels individually in the code to change the colour of the one that has been touched and read its tag value etc.
Thanks for any help.
I'm sort of getting in at the deep end (for me at least) a bit too quickly but I thought I'd ask for help on this before I continue with the beginner's guide.
I'm making a simple price calculator. Please see the attached image of how it will look more or less.
You can see three lines of numbers at the top half of the screen. The user will input values under pack size, unit size and price and the app will calculate the final figure in the right column. I'll call these figures the 'user inputs' for this post to make it easy to refer to them.
I want to use the keypad you can see in the image, rather than the android keyboard, so I have set the 'user inputs' as label views rather than edit text views. I thought it would be a very simple task to let the user touch one of the user inputs (i.e labels) and within b4a code be able to simply detect which label was touched. However, having read up on it, it would seem I was mistaken!
I understand using the reflection library makes it possible to detect when a user touches a label. I've searched for a simple tutorial on here as to how to do this but I can't find anything. I read the document (on the Wiki I think) relating to the reflection but it goes way over my head and uses jargon I do not understand yet.
So I was hoping somebody might tell me the basics if how I can detect which label is touched using Reflection.
I have given each label a different name and a different tag. I need to be able to refer to the labels individually in the code to change the colour of the one that has been touched and read its tag value etc.
Thanks for any help.