Я работаю с пользовательским alertDialog в android и нашел проблему. Мой код прост:custom alertDialog in android
LayoutInflater inflatre = getLayoutInflater();
View v = inflatre.inflate(R.layout.dialog_view, null);
AlertDialog.Builder dialog = new AlertDialog.Builder(EditPageActivity.this);
dialog.setView(v);
dialog.show();
И расположение XML является:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:padding="10dp"
android:gravity="center" >
<Button
android:id="@+id/gallery_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Gallery" />
<Button
android:id="@+id/photo_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/gallery_b"
android:text="Take Photo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/gallery_b"
android:layout_centerHorizontal="true"
android:text="Choose Image"
android:textSize="20sp"
android:textColor="@color/splash_font"
android:layout_marginBottom="10dp" />
Но выход, как это:
Чувство беспомощности после поиска Google : (... может кто-нибудь мне что-нибудь описать
набор 'андроида: layout_width = "fill_parent" андроид: layout_height = "fill_parent"' к вашей основной раскладке и попытаться –
удалить заполнить или использовать изображение с обратной связью по диагонали больше по высоте или просто вручную установить высоту макета –