teoREtik teoREtik - 4 months ago 11
Android Question

How to get Activity's content view?

What method should I call to know if an Activity has its contentView (once the method setContentView() has been called)?

Answer
this.getWindow().getDecorView().findViewById(android.R.id.content)

or

this.findViewById(android.R.id.content)

or

this.findViewById(android.R.id.content).getRootView()