Bug fixes

Fix: remove extra padding when Show additional Keyboard is set to false
This commit is contained in:
Wisest_wizard 2021-08-18 15:44:11 +05:30 committed by Wisest_wizard
parent cca1b0487a
commit 7c50f04486

View File

@ -125,6 +125,8 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
if (isInPictureInPictureMode) {
if (kbd.getVisibility() != View.GONE)
kbd.setVisibility(View.GONE);
@ -132,11 +134,13 @@ public class MainActivity extends AppCompatActivity {
return;
} else {
if (kbd.getVisibility() != View.VISIBLE)
kbd.setVisibility(View.VISIBLE);
int paddingDp = 35;
float density = this.getResources().getDisplayMetrics().density;
int paddingPixel = (int)(paddingDp * density);
frm.setPadding(0,0,0,paddingPixel);
if (preferences.getBoolean("showAdditionalKbd", true)) {
kbd.setVisibility(View.VISIBLE);
int paddingDp = 35;
float density = this.getResources().getDisplayMetrics().density;
int paddingPixel = (int)(paddingDp * density);
frm.setPadding(0,0,0,paddingPixel);
}
return;
}
}