mpcjanssen / simpletask-android

GNU General Public License v3.0
550 stars 128 forks source link

Keyboard obscures lists of tags on phone with high DPI #785

Open ghubby123 opened 7 years ago

ghubby123 commented 7 years ago

Bug description

Keyboard obscures long lists of tags when the phone is using a high DPI setting.

Steps to reproduce

  1. Set the DPI for the device to smallest:
    • Android Settings > Display > Display Size > Smallest
  2. Create a large number of tags (I have 47)
  3. From the main list of tasks, select/highlight a task
  4. Tap the 'update tags' button
  5. The tag/project list will be displayed, and then the keyboard will automatically display and obscure the lower portion (and buttons) of the tag/project selection screen

Actual result

The list of tags/projects is displayed but is partially obscured by the keyboard automatically being displayed

Expected result

List of tags would be displayed without the keyboard being displayed

Device info

Device: Google Nexus 6 Android version: Lineage OS (Android 7.1.2) Simpletask version: Simpletask Cloudless 9.0.7

Screenshots

Here you can see the actual behavior with a high DPI setting (keyboard obscuring the list):

high_dpi_with_keyboard

Here you can see the expected behavior with a low DPI setting (no keyboard obscuring the list):

low_dpi_no_keyboard

mpcjanssen commented 7 years ago

popping up the keyboard is done by the framework. but this looks like a possible fix: https://stackoverflow.com/questions/5622202/how-to-resize-alertdialog-on-the-keyboard-display

mpcjanssen commented 7 years ago

Reverted the fix because it leads to styling issues. Proper way to fix this is promote the popups to proper activities.

smichel17 commented 7 years ago

A dialogFragment, I think would be best. That would let you reuse it on the filter screen and maybe in the drawer if you want

mpcjanssen commented 7 years ago

that would be a great idea if fragment lifecycle handling wouldn't suck. Making it an activity is much simpler. See [1] for the rationale against fragements.