Force a full screen Activity to remeasure/redraw on resume?

后端 未结 8 1107
后悔当初
后悔当初 2021-01-05 05:14

Edited to add more details: (originally asked nearly two months ago...still haven\'t found a solution)

I have an activity with a somewhat complicate

8条回答
  •  一生所求
    2021-01-05 05:47

    I'm not sure if it'll work, but you might want to try this in that method:

    this.getWindow().getDecorView().invalidate();
    

    If that doesn't work on it's own, try adding to the onDraw(Canvas) method the instructions necessary to remove the title bar and do similar adjustments your activity might be doing at startup.

    Hope that helps.

提交回复
热议问题