how to get TEXT field of all the view ?

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Just to make app translation using AHLocale with Get.Text, i need to make a loop getting all the views, but need to check if TEXT field exists to try to get this text to be translated.

B4X:
Sub GetAllTexts (Activity As Activity)
Dim a As View
For i=0 To Activity.NumberOfViews - 1
      a = Activity.GetView(i)
      If a.text  - 'no TEXT field, as not all views have it
Next
End Sub

"View" type has no TEXT field, how to get it universally from all view types, if exists ?
 

peacemaker

Expert
Licensed User
Longtime User
Thanks, Erel !
 
Last edited:
Upvote 0

lymey

Active Member
Licensed User
Longtime User
Is it possible to set the view text also?
I would like to scan through the views in an activity and then set/reset the text value of a view depending on the text or tag value.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…