Material-dialogs: Weird behavior of action buttons in small screens

Created on 9 Jan 2019  路  6Comments  路  Source: afollestad/material-dialogs

Library Version:

2.0.0-rc7

Affected Device(s):

All devices with small screens

Describe the Bug:

Hi Aidan

I am showing a dialog with a custom view and the buttons are behaving really weird.

Pictures descriptions because the pictures are big 馃槗

  1. This is the dialog in a normal screen, without the keyboard shown (aka expected behavior).
  2. This is the dialog in a small screen before showing the keyboard.
  3. This is the dialog in a small screen while showing the keyboard.
  4. This is the dialog in a small screen after hiding the keyboard.

This is the dialog in a normal screen, without the keyboard shown (aka expected behavior).


This is the dialog in a small screen before showing the keyboard.


This is the dialog in a small screen while showing the keyboard.


This is the dialog in a small screen after hiding the keyboard.

bug

Most helpful comment

A trick I use with pictures on GitHub is straight up HTML 馃槃

<img src="url" width="250" />

After the picture uploads I just take out the URL and put it in an img tag

All 6 comments

A trick I use with pictures on GitHub is straight up HTML 馃槃

<img src="url" width="250" />

After the picture uploads I just take out the URL and put it in an img tag

Oh interesting - the keyboard must be causing a remeasure, making the dialog change it's decision on being "stacked".

@jahirfiquitiva oddly, I'm unable to reproduce.

Are you changing the soft input mode of your dialogs?

Edit: Oh wait, your custom view isn't in a ScrollView. That's probably effecting it. Will try that way.

Huh, even when not scrollable, I don't see that problem on a Nexus 5.

Thanks for letting me know about the images trick.

My custom view is a full width card, and a recyclerview below

Also, I set these flags in the AndroidManifest.xml:
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlelse picture jlelse  路  6Comments

SixianOne picture SixianOne  路  5Comments

bahmandamia6982 picture bahmandamia6982  路  6Comments

bernaferrari picture bernaferrari  路  5Comments

CHOIMINSEOK picture CHOIMINSEOK  路  8Comments