0

I am following this answer to construct settings of my application. My problem is that I get titlebar for nested PreferenceScreen elements. I tried to apply themes which turn off windowTitle. I tried to request window feature. But I was not successful. This problem is only on Gingerbread & Honeycomb. Post-Honeycomb everything works fine. Here is an image which shows two window titles one by me (this answer), another by system.

enter image description here

Can someone help me to hide titlebar set by window? I am pretty sure it can be achieved but Whatsapp Developers won't answer me :)

Community
  • 1
  • 1
Birendra Singh
  • 842
  • 11
  • 19

1 Answers1

0

Finally I managed to hide the titlebar with

        View titleView = dialog.findViewById(android.R.id.title);
        if (titleView != null) {
            ((View)titleView.getParent()).setVisibility(View.GONE);
        }

in accordance with the code in answer for Gingerbread & Honeycomb. Well with the if condition code can be written out of condition of being run only on Gingerbread & Honeycomb as post Honeycomb I have found titleView != null false.

Community
  • 1
  • 1
Birendra Singh
  • 842
  • 11
  • 19