我試圖做一個全屏警報對話框。但我已經得到這個ScreenShot。請幫助我改進它,完全填滿屏幕。我已經閱讀了很多問題,但是我無法解決這個問題。製作全屏警告對話框
這裏是我的代碼:
// AlertDialog Builder
AlertDialog.Builder bmneu = new AlertDialog.Builder(this, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
// Inflate
LayoutInflater inflate = this.getLayoutInflater();
// View
View v = inflate.inflate(R.layout.help_archive, null);
// Assign view to AlertDialogBuilder
bmneu.setView(v);
// Alert Dialog
AlertDialog alertHelp = bmneu.create();
// Show AlertDialog
alertHelp.show();
XML代碼(help_archive.xml):
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#40e9e2f7" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/txtHelpArchive1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="در این قسمت بایگانی از موارد خمسی ذخیره شده را مشاهده می کنید."
android:gravity="right"
android:padding="10dp"
android:textColor="#ffffff"
android:background="@android:color/transparent" />
<ImageView
android:id="@+id/imgHelpArchive1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/help_archive1"
android:padding="10dp" />
<TextView
android:id="@+id/txtArchive2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="تاریخ سال خمسی با مشخص بودن، شمسی و یا قمری بودن سال، مشخص شده است. در سمت چپ تصویر نیز برای حذف، تعبیه شده است."
android:gravity="right"
android:padding="10dp"
android:textColor="#ffffff"
android:background="@android:color/transparent" />
<ImageView
android:id="@+id/imgHelpArchive2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/help_archive2"
android:padding="10dp" />
<TextView
android:id="@+id/txtHelpArchive3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="با فشردن کلیدهای زیر می توانید، می توانید مواردی را که قبلا ذخیره کرده اید، مشاهده و یا ارسال کنید."
android:gravity="right"
android:padding="10dp"
android:textColor="#ffffff"
android:background="@android:color/transparent" />
<ImageView
android:id="@+id/imgHelpArchive3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/help_archive3"
android:padding="10dp" />
</LinearLayout>
</ScrollView>
感謝。
儘量把marginTop /底部到零布局'help_archive'。如果這不起作用,然後嘗試設置爲bmneu。 –
在我的佈局邊距爲零。如何設置bmenu? –
help_archive佈局文件中的值是什麼 – andre3wap