mirror of
https://github.com/vectras-team/termux-x11.git
synced 2024-11-24 07:11:04 +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
|
@Override
|
||||||
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
|
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
|
||||||
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
if (isInPictureInPictureMode) {
|
if (isInPictureInPictureMode) {
|
||||||
if (kbd.getVisibility() != View.GONE)
|
if (kbd.getVisibility() != View.GONE)
|
||||||
kbd.setVisibility(View.GONE);
|
kbd.setVisibility(View.GONE);
|
||||||
@ -132,11 +134,13 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (kbd.getVisibility() != View.VISIBLE)
|
if (kbd.getVisibility() != View.VISIBLE)
|
||||||
kbd.setVisibility(View.VISIBLE);
|
if (preferences.getBoolean("showAdditionalKbd", true)) {
|
||||||
int paddingDp = 35;
|
kbd.setVisibility(View.VISIBLE);
|
||||||
float density = this.getResources().getDisplayMetrics().density;
|
int paddingDp = 35;
|
||||||
int paddingPixel = (int)(paddingDp * density);
|
float density = this.getResources().getDisplayMetrics().density;
|
||||||
frm.setPadding(0,0,0,paddingPixel);
|
int paddingPixel = (int)(paddingDp * density);
|
||||||
|
frm.setPadding(0,0,0,paddingPixel);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user