R RB Smissaert Well-Known Member Licensed User Longtime User Dec 27, 2018 #1 Despite giving a tag to all the views in my project (including Activity) I can see there is still one view with a Null tag. Can't figure out what this view is. I can reproduce this easily for example take this project: https://www.b4x.com/android/forum/threads/b4x-xui-b4xdialog-custom-dialogs.99756/ and give all views a tag the same as the view name and do in Public Sub Show: Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = False Log("Dialog.Show, vTag: " & v.Tag) Next Then we get: Dialog.Show, vTag: iv Dialog.Show, vTag: Base Dialog.Show, vTag: -3 Dialog.Show, vTag: -1 Dialog.Show, vTag: null Dialog.Show, vTag: txtFirstName Dialog.Show, vTag: txtLastName Dialog.Show, vTag: Label1 Dialog.Show, vTag: Label2 So, what is the view here with the null Tag? RBS
Despite giving a tag to all the views in my project (including Activity) I can see there is still one view with a Null tag. Can't figure out what this view is. I can reproduce this easily for example take this project: https://www.b4x.com/android/forum/threads/b4x-xui-b4xdialog-custom-dialogs.99756/ and give all views a tag the same as the view name and do in Public Sub Show: Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = False Log("Dialog.Show, vTag: " & v.Tag) Next Then we get: Dialog.Show, vTag: iv Dialog.Show, vTag: Base Dialog.Show, vTag: -3 Dialog.Show, vTag: -1 Dialog.Show, vTag: null Dialog.Show, vTag: txtFirstName Dialog.Show, vTag: txtLastName Dialog.Show, vTag: Label1 Dialog.Show, vTag: Label2 So, what is the view here with the null Tag? RBS
Sandman Expert Licensed User Longtime User Dec 27, 2018 #2 I can think of several ways of finding the null view, but how about this for starters? (And let's hope it's actually on-screen.) Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = (v.Tag = Null) Log("Dialog.Show, vTag: " & v.Tag) Next Upvote 0
I can think of several ways of finding the null view, but how about this for starters? (And let's hope it's actually on-screen.) Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = (v.Tag = Null) Log("Dialog.Show, vTag: " & v.Tag) Next
R RB Smissaert Well-Known Member Licensed User Longtime User Dec 27, 2018 #3 Sandman said: I can think of several ways of finding the null view, but how about this for starters? (And let's hope it's actually on-screen.) Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = (v.Tag = Null) Log("Dialog.Show, vTag: " & v.Tag) Next Click to expand... I tried that, but it gives me exactly the same log output. Did you try the quoted example? RBS Upvote 0
Sandman said: I can think of several ways of finding the null view, but how about this for starters? (And let's hope it's actually on-screen.) Code: For Each v As B4XView In Background.GetAllViewsRecursive v.Enabled = (v.Tag = Null) Log("Dialog.Show, vTag: " & v.Tag) Next Click to expand... I tried that, but it gives me exactly the same log output. Did you try the quoted example? RBS
Sandman Expert Licensed User Longtime User Dec 27, 2018 #4 Well, with my example you shouldn't look at the log. Look at your screen, the Null view should be the only one visible. (Try setting the X and Y pos of it to be on-screen if needed.) Upvote 0
Well, with my example you shouldn't look at the log. Look at your screen, the Null view should be the only one visible. (Try setting the X and Y pos of it to be on-screen if needed.)
Star-Dust Expert Licensed User Longtime User Dec 27, 2018 #5 If you want to see what kind of view it is and where it is you do it Code: For Each v As View In Background.GetAllViewsRecursive Log("________") Log("Tag: " & v.Tag) Log("Type Class: " & v) Log("Top: " & v.Top) Log("Left: " & v.Left) Next Upvote 0
If you want to see what kind of view it is and where it is you do it Code: For Each v As View In Background.GetAllViewsRecursive Log("________") Log("Tag: " & v.Tag) Log("Type Class: " & v) Log("Top: " & v.Top) Log("Left: " & v.Left) Next
R RB Smissaert Well-Known Member Licensed User Longtime User Dec 27, 2018 #6 Star-Dust said: If you want to see what kind of view it is and where it is you do it Code: For Each v As View In Background.GetAllViewsRecursive Log("________") Log("Tag: " & v.Tag) Log("Type Class: " & v) Log("Top: " & v.Top) Log("Left: " & v.Left) Next Click to expand... Yes, can see that in the quoted example it was the panel called p, which I hadn't given a tag. Mystery solved. RBS Upvote 0
Star-Dust said: If you want to see what kind of view it is and where it is you do it Code: For Each v As View In Background.GetAllViewsRecursive Log("________") Log("Tag: " & v.Tag) Log("Type Class: " & v) Log("Top: " & v.Top) Log("Left: " & v.Left) Next Click to expand... Yes, can see that in the quoted example it was the panel called p, which I hadn't given a tag. Mystery solved. RBS
Cableguy Expert Licensed User Longtime User Dec 27, 2018 #7 This may be a wild guess, but, can it be that the null view is the "parent" of all the others, like in B4J, the "Form" is not the parent, the rootpane is... So this null view may be the activity panel... Upvote 0
This may be a wild guess, but, can it be that the null view is the "parent" of all the others, like in B4J, the "Form" is not the parent, the rootpane is... So this null view may be the activity panel...
R RB Smissaert Well-Known Member Licensed User Longtime User Dec 27, 2018 #8 Cableguy said: This may be a wild guess, but, can it be that the null view is the "parent" of all the others, like in B4J, the "Form" is not the parent, the rootpane is... So this null view may be the activity panel... Click to expand... In the quoted example it was the panel called p, which I forgot to give a Tag. BTW, it looks that in the quoted example we could do away with the panel called Base. Will have a look at that. RBS Upvote 0
Cableguy said: This may be a wild guess, but, can it be that the null view is the "parent" of all the others, like in B4J, the "Form" is not the parent, the rootpane is... So this null view may be the activity panel... Click to expand... In the quoted example it was the panel called p, which I forgot to give a Tag. BTW, it looks that in the quoted example we could do away with the panel called Base. Will have a look at that. RBS