Android Question Is there any limit on the number of views on a screen, activity?

vecino

Well-Known Member
Licensed User
Longtime User
Hello, a time has come when I add a new view and it is not shown later.
Is there a limit?
Thank you.
 

stevel05

Expert
Licensed User
Longtime User
Unlikely, have you checked that the new view is marked as visible, is not behind another view or pane, is not the background colour with no text or anything that you can see, is not outside of the screen area (either by positioning or Designer script error). That's about all I can think of without knowing more about the layout.

How many views are you talking about?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Thank you very much to both.
It is an application that is running on thousands of clients.
The activity that has the problem contains approximately 200 views.
I have been asked for a new functionality and by adding a simple "label", it is not displayed.
I've been there for days. I will continue to check and comment.
It is also an application made in older versions of B4A and now I have opened it with version 7.30 (I do not know if there may be a problem for that)
Thank you.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Also check the anchors are not hiding it.

Try adding
B4X:
Sleep(50)
{labelName}.BringToFront

at the end of the sub that loads the layout, it may help find it if it's hidden behind something else.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Hello again.
I just discovered that what does not work is "BringToFront" :eek:
Can it be a bug in v7.30?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It probably won't work if you are calling it in ActivityCreate, or any sub that is loading a layout unless you use the Sleep method to delay the call.

If it doesn't work with Sleep(50), try a longer delay.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I already found the problem.
The problem is android 5.x :confused:
So far all my users had android 4.x
I found this link warning of the problem and the solution: link1 and link2
I hate android :mad: :D
Thank you very much to everyone for your help :)
 
Upvote 0
Top