let keyboard work in fullscreen mode too
This commit is contained in:
parent
96ab292a5d
commit
fc0e66fc7a
@ -20,6 +20,7 @@ import android.content.Intent;
|
|||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.graphics.Rect;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@ -67,8 +68,14 @@ public class IITC_Mobile extends Activity {
|
|||||||
iitc_view.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
|
iitc_view.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onGlobalLayout() {
|
public void onGlobalLayout() {
|
||||||
if ((iitc_view.getRootView().getHeight() - iitc_view.getHeight()) >
|
Rect r = new Rect();
|
||||||
iitc_view.getRootView().getHeight()/3) {
|
//r will be populated with the coordinates of your view that area still visible.
|
||||||
|
iitc_view.getWindowVisibleDisplayFrame(r);
|
||||||
|
|
||||||
|
int screenHeight = iitc_view.getRootView().getHeight();
|
||||||
|
int heightDiff = screenHeight - (r.bottom - r.top);
|
||||||
|
boolean visible = heightDiff > screenHeight / 3;
|
||||||
|
if (visible == true) {
|
||||||
Log.d("iitcm", "Open Keyboard...");
|
Log.d("iitcm", "Open Keyboard...");
|
||||||
IITC_Mobile.this.keyboad_open = true;
|
IITC_Mobile.this.keyboad_open = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user