Android Question How to send text to a label created by code

driesvp

Member
Licensed User
Longtime User
Dear all,

On a layout I added several identical panels by code. On this panels there are again identifical labels added by code.

My question: how can I change the values of certain labels?
 

derez

Expert
Licensed User
Longtime User
You must identify the label you want to change somehow.
There are three ways:
1. Give each label a name (by initialization method)
2. Give all labels the same name and identify the "sender" when clicked.
3. Use panel.GetView but you have to know the index of the label.
 
Last edited:
Upvote 0
Top