Reputation: 306
My application does not want to refresh the view you see when I use invalidate()
on either of my layouts, nor if I use this.invalidate()
. I have used .removeAllViews()
to remove the views from the target Layout and have tried using invalidate and that is not working either.
Is there another way to refresh the screen so that it shows an up to date image. The image users would see is a group of editTexts and labels depicting what information is needed and then this is all removed and then the screen should refresh to then not show it any more.
If any further information is required please ask, THIS IS URGENT! Thanks for your help!
Upvotes: 1
Views: 1230
Reputation: 2860
invalidate will force Android to update when onDraw is called again. You could try calling onDraw(Canvas)
yourself, as it seems it's not getting called automatically.
Alternatively, you could create another layout file, and just change the layout of the view by using
setContentView(R.layout.newlayout)
Upvotes: 1