Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

check if XML layout currently shown?

When using a broadcast receiver to load an xml layout on screen (when an event happens). Sometimes the xml is not displayed, despite the fact the receiver catches the event.

Is there a check i can perform to see if a specific xml layout is displayed on screen atm?

like image 924
Eitan Schwartz Avatar asked Mar 13 '26 23:03

Eitan Schwartz


1 Answers

To me your question reads like you want a getContentView() method, which Activity unfortunately doesn't have. Two alternative solutions to this problem can be found in these questions:

Why isnt there a getcontentview method for activity?

Is there any method getContentView like setContentview?

like image 128
Chilledrat Avatar answered Mar 16 '26 12:03

Chilledrat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!