例如,以下代碼:
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("foo");
builder.setMessage("bar");
EditText edit = new EditText(activity);
builder.setView(edit);
builder.show();

和一個名為“customPanel”的FrameLayout包含EditText

該空間小部件具有的指定高度18dp(我們將看到一個時刻),而FrameLayout里的最小高度的48dp可在版式檢查的屬性可以看出。
AlertDialog使用的布局是
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/326265.html
上一篇:我正在嘗試將此影像以線性布局居中,但它不起作用,我該怎么辦
下一篇:錯誤-java.lang.ClassCastException:com.google.android.material.appbar.AppBarLayout無法轉換為androidx.appcomp
