I have an activity that has the following set as theme:
android:theme="@android:style/Theme.Dialog"
However, there is a title bar in the activity-dialog that appears, that uses up the little available space that I have. How can I remove it?
I have an activity that has the following set as theme:
android:theme="@android:style/Theme.Dialog"
However, there is a title bar in the activity-dialog that appears, that uses up the little available space that I have. How can I remove it?
For those who are using
AppCompatActivity
, above answers may not work.Try this
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
immediately before
setContentView(R.layout.MyDialogActivity);
You can define your own theme:
(Tip of the hat to @Rehan) If you're using the compatibility library, you should pick an
AppCompat
parent theme and leave off theandroid:
prefix. For example: