I'm trying to create an alert dialog with a custom view layout, but the screen just dims with no dialog appearing.
AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this); builder.setView(findViewById(R.id.system_profile_dialog)); AlertDialog setSysProfileDialog = builder.create(); setSysProfileDialog.show(); XML:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/system_profile_dialog" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:hint="@string/system_profile_hint" android:inputType="number" /> </LinearLayout>