Android Dialog: Removing title bar

后端 未结 13 2297
醉酒成梦
醉酒成梦 2020-11-29 18:24

I have a weird behavior I can\'t pinpoint the source of.

I have my app with the classic

requestWindowFeature(Window.FEATURE_NO_TITLE);
13条回答
  •  忘掉有多难
    2020-11-29 18:56

    I am an Android novice and came across this question trying to get rid of a title bar.

    I'm using an activity and displaying it as a dialog. I was poking around with themes and came across a useful bit of default theming.

    Here's the code from my AndroidManifest.xml that I was using when the title bar was showing:

    
    
    
    

    Here's the change that got me my desired result:

    
    
    
    

    As I said, I'm still new to Android, so this may have undesirable side-effects, but it appears to have given me the outcome I wanted, which was just to remove the title bar from the dialog.

提交回复
热议问题