Android Question New code for E2E Activity does not refresh when I remove a view.

MrKim

Well-Known Member
Licensed User
Longtime User
Using the code HERE

I am adding a listview to the activity - tried adding it both to the activity and the root.
I also tried adding the listview to a panel and then removing that.

When I remove the list view from the activity or the root (tried adding it to both.
The Root does not refresh and I am left with a blank screen.
Activity.Invalidate Does not refresh the screen
Rotating the device does.

Example attached. Press the employee button.
 

Attachments

  • AAAATest.zip
    36.8 KB · Views: 72
Solution
Sigh, my bad, deep in the code for this very large (and old) program is a routine called HideAll. It removes all views. I had to exclude Root.

Updating these old apps is going to be a pain.

And don't tell me update to pages. These are old apps that only have 20 or 30 users but they have been using them for 10 or 20 years and like them just the way they are.

I have a Pages app that is cleaner that newer customers use but they don't like it. And we are one of those dumb companies that doesn't say tough shit and force the move. We actually try to give customers what they want.

Here is what I did:

Had this:
B4X:
        For Each v As View In Activity.GetAllViewsRecursive
            v.Visible = False
        Next
Added:
B4X:
...

MrKim

Well-Known Member
Licensed User
Longtime User
Sigh, my bad, deep in the code for this very large (and old) program is a routine called HideAll. It removes all views. I had to exclude Root.

Updating these old apps is going to be a pain.

And don't tell me update to pages. These are old apps that only have 20 or 30 users but they have been using them for 10 or 20 years and like them just the way they are.

I have a Pages app that is cleaner that newer customers use but they don't like it. And we are one of those dumb companies that doesn't say tough shit and force the move. We actually try to give customers what they want.

Here is what I did:

Had this:
B4X:
        For Each v As View In Activity.GetAllViewsRecursive
            v.Visible = False
        Next
Added:
B4X:
        Root.Tag = "Root"
In Activity_Create
and changed it to this:
B4X:
        For Each v As View In Activity.GetAllViewsRecursive
            If Not(DCMod.Nz(v.Tag, "") = "Root") Then 
                v.Visible = False
            End If
        Next
 
Last edited:
Upvote 0
Solution

teddybear

Well-Known Member
Licensed User
I don't think you should mark that as the solution to this thread
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I don't think you should mark that as the solution to this thread
Well, should I ask Erel to remove the thread.? That is what should happen since it was entirely my fault.
I hate to see people wasting time reading this and the responses. As the solution it puts it right at the top.
Perhaps I should put the code in that was the culprit and add the solution?
 
Upvote 0
Top