I am developing app with minSdkVersion=\"11\", that is app for tablets and Android 4.0 and newer. I have scrutinized internet on this topic, but have not found much.
To
I had the same issue than you.
I tried a lot of stuff but here is my full code:
https://github.com/iRail/BeTrains-for-Android/blob/master/src/tof/cv/mpp/MyPreferenceActivity.java
The trick is to add the setContentView in the onBuildHeaders section, but NOT in the onCreate.
I also made some tests in fragment and not perfectly sure why this is working, but I promise you: I have a custom layout on tablet header section!
https://github.com/iRail/BeTrains-for-Android/blob/master/src/tof/cv/mpp/view/StockPreferenceFragment.java