我正在使用活動來作爲對話框工作。但是,對話框活動的actionBar不會消失。我曾嘗試使用:對話框活動中消失的動作欄
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_dialog);
}
它不起作用。我還設置了應用程序(從清單)的主題是如下:
<activity
android:name=".DialogActivity"
android:label="@string/title_activity_dialog"
android:theme="@style/Theme.AppCompat.Light.Dialog.Alert" >
</activity>
以下是屏幕截圖就是我得到的和我的目標,以去除隱藏着這個毫無意義的白條文本。 The Screen Shot of the Emulator
謝謝。
喜刪除以下部分,感謝您的及時回覆。我嘗試了上面提到的更改並仍然顯示欄:/。 –
請嘗試編輯答案。 – user2925656
我想可能還有其他一些我看不到的問題。活動(用於對話框)是否爲空或空? 。 –