Revision db266f25
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/dialog/RubikDialogSetName.java | ||
|---|---|---|
| 96 | 96 |
} |
| 97 | 97 |
|
| 98 | 98 |
builder.setCancelable(true); |
| 99 |
EditText edit = view.findViewById(R.id.set_name); |
|
| 100 |
edit.requestFocus(); |
|
| 101 |
|
|
| 99 | 102 |
builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() |
| 100 | 103 |
{
|
| 101 | 104 |
@Override |
| ... | ... | |
| 123 | 126 |
}); |
| 124 | 127 |
|
| 125 | 128 |
builder.setView(view); |
| 129 |
Dialog dialog = builder.create(); |
|
| 130 |
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); |
|
| 126 | 131 |
|
| 127 |
return builder.create();
|
|
| 132 |
return dialog;
|
|
| 128 | 133 |
} |
| 129 | 134 |
} |
| src/main/res/layout/dialog_set_name.xml | ||
|---|---|---|
| 29 | 29 |
<EditText |
| 30 | 30 |
android:id="@+id/set_name" |
| 31 | 31 |
android:layout_width="match_parent" |
| 32 |
android:layout_height="wrap_content"/> |
|
| 32 |
android:layout_height="wrap_content" |
|
| 33 |
android:layout_marginLeft="50dp" |
|
| 34 |
android:layout_marginRight="50dp" |
|
| 35 |
android:layout_marginBottom="10dp" |
|
| 36 |
android:textSize="24sp" |
|
| 37 |
android:textColor="@color/black" |
|
| 38 |
android:background="@color/white"/> |
|
| 33 | 39 |
|
| 34 | 40 |
</LinearLayout> |
| 35 | 41 |
</LinearLayout> |
Also available in: Unified diff
Progresswith the new Dialog, SetName.