Android Question Selecting not empty labels

tufanv

Expert
Licensed User
Longtime User
Hello,

I have 25 labels in my app. some of them have values and some of them are " " (means empty).

How can i list the labels that are not empty ? ( i dont want the list the empty ones)

TY
 

Xandoca

Active Member
Licensed User
Longtime User
Hello,

I have 25 labels in my app. some of them have values and some of them are " " (means empty).

How can i list the labels that are not empty ? ( i dont want the list the empty ones)

TY
Try
B4X:
  Dim i As Int
  
   For  i = 1 To Activity.NumberOfViews
     Try

       Dim lb As Label
       If Activity.GetView(i) Is Label Then
         lb = Activity.GetView(i)
         If lb.Text <> "" Then Msgbox (lb.Text, "")        
       End If
     Catch
       Log(LastException.message)
     End Try

   Next
 
Upvote 0
Top