mirror of
https://github.com/vectras-team/termux-x11.git
synced 2024-11-23 23:00:20 +00:00
Bug fixes
Fix: remove extra padding when Show additional Keyboard is set to false
This commit is contained in:
parent
cca1b0487a
commit
7c50f04486
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user