Отображается настраиваемое диалоговое окно Android Строка заголовка android

Я создал такой xml-файл:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:gravity="bottom"
              android:layout_gravity="bottom"
              android:background="#04600F"
              android:padding="10dp">

              <TextView android:id="@+id/txtMessage"
                        android:layout_width="fill_parent" 
                        android:gravity="center"
                        android:layout_height="wrap_content"/>

              <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                              android:orientation="horizontal"
                              android:layout_width="fill_parent"
                              android:layout_height="wrap_content">

                            <Button android:id="@+id/btnOne"
                                    android:layout_width="wrap_content" 
                                    android:layout_height="wrap_content"
                                    android:textSize="20dip"
                                    android:textColor="#ffffff"
                                    android:layout_alignParentLeft="true"
                                    android:background="@drawable/black_menu_button"
                                    android:layout_marginLeft="5dip"
                                    android:layout_centerVertical="true"
                                    android:layout_centerHorizontal="true"/> 

                            <Button android:id="@+id/btnTwo"
                                    android:layout_width="wrap_content" 
                                    android:layout_height="wrap_content"
                                    android:textSize="20dip"
                                    android:textColor="#ffffff"
                                    android:layout_alignParentRight="true"
                                    android:background="@drawable/blue_menu_button"
                                    android:layout_marginRight="5dip"
                                    android:layout_centerVertical="true"
                                    android:layout_centerHorizontal="true"/>
              </RelativeLayout>
</LinearLayout>

И я пытаюсь получить к нему доступ так:

    final Dialog dialog = new Dialog(ctx,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
    dialog.setContentView(R.layout.myxml);
.....

Он выглядит на экране именно так, как я хочу, внизу. В моем приложении есть следующий набор в AndroidManifest:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

Единственным недостатком того, что я сделал, является то, что строка заголовка Android (та, что с батареей / сигналом ... ) становится видимым, пока виден мой диалог. Как я могу его отключить?

Позже редактировать

Спасибо, что указали мне, решение было действительно довольно простым

dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
6
задан Alin 10 October 2010 в 09:54
поделиться