android - Changing View properties after onCreate() -
The first time the poster is new to Android, and I have a roadblock on this problem:
I am creating a dynamic layout that includes many identical "holistic" objects (these are basically "Floating" liner layouts, each containing an icon (image view) and caption (textview). (X, Y) coordinates based on user actions Are subject to tuned, and require precise placement (i.e.: relative layout, etc.) can not be used, so I am putting them inside a complete layout.
OnCreate (), I am adding each of these as a child into a AbsoluteLayout object, then manually setting up (X, Y) there is no problem yet, great works, the initial layout At once Right.
Problem:
After the initial process (), I can update their layout parasomes (X, Y) positions to change these objects on the screen , But the on-screen layout (inside AbsoluteLayout) is never refreshed. I have tried the force layout (), invalid (), requestLayout (), none of them works.
Is there a problem in my basic approach here, or am I missing something?
I am thinking of converting to a SurfaceView and just rendering it harder, but my code still works 99% great and I do not want to change it, if I do not have to do only one problem It is that layout manager only refused to change the position for my child objects.
Help, what am I doing?
Have you tried to create a handler for the UI and then updating your UI with that ..
The UI will not be updated with a different thread. Therefore, create a thread handler for the UI and update the changes using the handler.
-wini
Comments
Post a Comment