Soft keyboard overlaps EditTextPreferenceDialogFragmentCompat when AppTheme is Translucent
Asked Answered
D

2

13

Using

  • latest V14 Preference Support Library.

  • Translucent Theme on API > 19

  • EditTextPreferenceCompat inside PreferenceFragmentCompat

Problem

Tapping on EditTextPreferenceCompat is followed by popping EditTextPreferenceDialogFragmentCompat with controls overlapped by soft keyboard which is wrong:

enter image description here

  • If i use non Translucent Theme or API < 19 - everything is fine.
  • If i use normal DialogFragment with Translucent Theme - everything is fine.

What did i try?

Any workaround for this?

Disembarrass answered 2/12, 2016 at 8:59 Comment(3)
The translucent theme is messing up here. maybe try this solution: #7417623Rover
@R.Zagórski normal DialogFragments work well with Translucent Theme - so i think it is related only to V14 implementationDisembarrass
@Disembarrass maybe the Translucent Theme are overriding the onConfigurationChanged. This behaviour usually happens when you override the onConfigurationChanged. Can you create a repository on github with the code that shows the bug? So I can make some tests.Boelter
C
0

Translucent/Fullscreen can cause adjust_resize not working.If you get the height of soft keyboard can help you solve the problem,you can change the view's height by soft keyboard's height. However,google doesn't open the api of getting the height of soft keyboard.One way is that you set a view tree listener.

Callao answered 7/2, 2018 at 2:38 Comment(0)
J
0

Have same problem.

Just try add to AppTheme this line

<item name="android:dialogTheme">@style/Theme.AppCompat.Light.Dialog</item>

or via setStyle method in your DialogFragment.

You can choose any other dialog theme that u want.

Juglandaceous answered 18/9, 2018 at 11:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.