I have a vertically aligned LinearLayout which contains a TextView, my own custom view class, and i'm hoping to put an ad at the bottom.
I'm drawing objects in my custom view class (that extends View), but it does not get updated to the screen unless i call setContentView(R.layout.myview)
, but this resets my TextView to the default text (what is stored in the xml file) which i don't want, and i assume it would redraw a new ad as well... annoying.
Is there a way i can redraw/refresh my custom View to the screen without affecting my textview or whatever else i may have on my layout?
How about View.invalidate()
?
From the reference:
Note that the framework will not draw views that are not in the invalid region.
To force a view to draw, call invalidate().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With