• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

setContentView with a class

I'm looking at this compass tutorial. It's the third sensor tutorial down about the compass sensor. In MainActivity setContentView they are inserting the MyCompassView class like this: setContentView(compassView) instead of inserting a XML layout like this: setContentView(R.layout.activity_main);

This does compile and load, but there is no display on the screen of the phone other than a white background and the action bar. Any ideas?
 
Back
Top Bottom