Disable extrakeys for screen reseeding
Screen reseeding currently doesn't support extrakeys.. The views overlap
This commit is contained in:
parent
87f9e2de01
commit
b91ab8dea5
@ -14,8 +14,9 @@ import android.view.MotionEvent;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.HorizontalScrollView;
|
import android.widget.HorizontalScrollView;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.view.SurfaceView;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -63,6 +64,11 @@ public class AdditionalKeyboardView extends HorizontalScrollView implements View
|
|||||||
setVisibility(View.GONE);
|
setVisibility(View.GONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (preferences.getBoolean("Reseed", true)) {
|
||||||
|
if (getVisibility() != View.GONE)
|
||||||
|
setVisibility(View.GONE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Rect r = new Rect();
|
Rect r = new Rect();
|
||||||
getWindowVisibleDisplayFrame(r);
|
getWindowVisibleDisplayFrame(r);
|
||||||
|
@ -7,7 +7,8 @@ import android.view.ViewGroup;
|
|||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,11 +101,12 @@ public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
|
|||||||
* Force closes the soft keyboard
|
* Force closes the soft keyboard
|
||||||
* @param activeView the view with the keyboard focus
|
* @param activeView the view with the keyboard focus
|
||||||
*/
|
*/
|
||||||
public static void forceCloseKeyboard(View activeView)
|
public void forceCloseKeyboard(View activeView)
|
||||||
{
|
{
|
||||||
InputMethodManager inputMethodManager = (InputMethodManager) activeView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager inputMethodManager = (InputMethodManager) activeView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if(inputMethodManager != null)
|
if(inputMethodManager != null) {
|
||||||
inputMethodManager.hideSoftInputFromWindow(activeView.getWindowToken(), 0);
|
inputMethodManager.hideSoftInputFromWindow(activeView.getWindowToken(), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeListener()
|
private void removeListener()
|
||||||
@ -124,4 +126,4 @@ public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
|
|||||||
mScreenDensity = act.getResources().getDisplayMetrics().density;
|
mScreenDensity = act.getResources().getDisplayMetrics().density;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,4 +109,5 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {}
|
public void onBackPressed() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent" android:layout_height="match_parent">
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<SurfaceView
|
<SurfaceView
|
||||||
android:id="@+id/lorieView"
|
android:id="@+id/lorieView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<com.termux.x11.AdditionalKeyboardView
|
<com.termux.x11.AdditionalKeyboardView
|
||||||
android:id="@+id/additionalKbd"
|
android:id="@+id/additionalKbd"
|
||||||
@ -16,4 +17,4 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
android:title="Reseed Screen While Soft Keybourd is open"
|
android:title="Reseed Screen While Soft Keybourd is open"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="Reseed"
|
android:key="Reseed"
|
||||||
android:summary="The screen size will be adjusted while Soft Keybourd is open" />
|
android:summary="The screen size will be adjusted while Soft Keybourd is open. Additional Keybaord is not supported by this option." />
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Loading…
Reference in New Issue
Block a user