Да, вы можете изменить свое диалоговое окно так, как вы хотите. Вы можете сделать это, создав собственное диалоговое окно. Шаг1. Создать стиль в файле String в res
<style name="myQuitDialog" parent="android:Theme.Dialog">
<item name="android:gravity">center_horizontal</item>
</style>
Шаг2. Создайте файл xml в макетах
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_quit"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/image which u want to show"
>
</RelativeLayout>
Шаг 3. Написать код диалогового окна пользовательских в ЦСИ
class Custom_Dialog extends Dialog {
protected Custom_Dialog(Context context, int theme) {
super(context, theme);
// TODO Auto-generated constructor stub
}
private void show_alert() {
final Custom_Dialog alertbox = new Custom_Dialog(this, R.style.myQuitDialog);
Window window = alertbox.getWindow();
window.setBackgroundDrawableResource(android.R.color.transparent);
window.requestFeature(window.FEATURE_NO_TITLE);
alertbox.show();
alertbox.setCancelable(true);
alertbox.setCanceledOnTouchOutside(true);
alertbox.dismiss();
}
}
Какое украшение, ...? – ngesh
есть много ссылок в Google для создания пользовательских диалогов. –
песчаный, визуальный –