remove unused KeyboardAwareLinearLayout.isBubble

This commit is contained in:
B. Petersen
2024-04-28 22:39:34 +02:00
committed by bjoern
parent 17cf9face0
commit 1b371a1b72
@@ -65,7 +65,6 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
private boolean keyboardOpen = false;
private int rotation = 0;
private boolean isBubble = false;
private long openedAt = 0;
public KeyboardAwareLinearLayout(Context context) {
@@ -95,10 +94,6 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
public void setIsBubble(boolean isBubble) {
this.isBubble = isBubble;
}
private void updateRotation() {
int oldRotation = rotation;
rotation = getDeviceRotation();
@@ -237,40 +232,23 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
}
private int getKeyboardLandscapeHeight() {
if (isBubble) {
return getRootView().getHeight() - minCustomKeyboardTopMarginLandscapeBubble;
}
int keyboardHeight = PreferenceManager.getDefaultSharedPreferences(getContext())
.getInt("keyboard_height_landscape", defaultCustomKeyboardSize);
return Util.clamp(keyboardHeight, minCustomKeyboardSize, getRootView().getHeight() - minCustomKeyboardTopMarginLandscape);
}
private int getKeyboardPortraitHeight() {
if (isBubble) {
int height = getRootView().getHeight();
return height - (int)(height * 0.45);
}
int keyboardHeight = PreferenceManager.getDefaultSharedPreferences(getContext())
.getInt("keyboard_height_portrait", defaultCustomKeyboardSize);
return Util.clamp(keyboardHeight, minCustomKeyboardSize, getRootView().getHeight() - minCustomKeyboardTopMarginPortrait);
}
private void setKeyboardPortraitHeight(int height) {
if (isBubble) {
return;
}
PreferenceManager.getDefaultSharedPreferences(getContext())
.edit().putInt("keyboard_height_portrait", height).apply();
}
private void setKeyboardLandscapeHeight(int height) {
if (isBubble) {
return;
}
PreferenceManager.getDefaultSharedPreferences(getContext())
.edit().putInt("keyboard_height_landscape", height).apply();
}