Skip to content

Commit 1a74528

Browse files
Resize entire dialog when focusing edittext
1 parent 469d8b3 commit 1a74528

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.idea/caches/gradle_models.ser

17 Bytes
Binary file not shown.

dialogsheet/src/main/java/com/marcoscg/dialogsheet/DialogSheet.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import android.support.v7.widget.AppCompatTextView;
2121
import android.text.TextUtils;
2222
import android.view.View;
23+
import android.view.WindowManager;
2324
import android.widget.LinearLayout;
2425
import android.widget.RelativeLayout;
2526

@@ -452,6 +453,9 @@ private void init(Context context) {
452453

453454
bottomSheetDialog.setContentView(R.layout.layout_bottomdialog);
454455

456+
if (bottomSheetDialog.getWindow() != null)
457+
bottomSheetDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
458+
455459
titleTextView = bottomSheetDialog.findViewById(R.id.dialogTitle);
456460
messageTextView = bottomSheetDialog.findViewById(R.id.dialogMessage);
457461
iconImageView = bottomSheetDialog.findViewById(R.id.dialogIcon);

0 commit comments

Comments
 (0)