Im having a problem during an action in my activity. I have created a runnable, that runs on a thread. The thread checks if a textview has been swiped and moves the textview off screen. Once that textview is offscreen it removes it from the linearlayout. The layout does not update the textviews in it and leaves the space that the previous textview was at.
How it is now:
__________ __________ __________
|[item 1]| -----> |[item 1]| -----> |[item 1]|
|[item 2]| User |[swiped]| item 2 | |
|[item 3]| swipes |[item 3]| space |[item 3]|
|[item 4]| item 2 |[item 4]| remains |[item 4]|
|[item 5]| |[item 5]| |[item 5]|
---------- ---------- ----------
How I want it to run:
__________ __________ __________
|[item 1]| -----> |[item 1]| -----> |[item 1]|
|[item 2]| user |[swiped]| removed |[item 3]|
|[item 3]| swiped |[item 3]| view & |[item 4]|
|[item 4]| |[item 4]| update |[item 5]|
|[item 5]| |[item 5]| space | |
---------- ---------- ----------
I hope this explains what is going on and what I have. If not ill add more.
EDIT: If i lock and unlock my screen, it updates the UI, and the views are fixed. It seems I am looking for a refresh or maybe invalidate()?