I'm making android phonegap application.
I set editText under the CordovaWebView. I want to get keyboard show / hide event.
Try to calculate view height , but fail. When editText has focus , keyboard is shown. But CordovaWebView goes up , and view size not change. So I can't get keyboard shown event.
Why view goes up ?
here is the partial of my code.
MainActivity onCreateMethod()
int layoutId = R.layout.blank;
layout = new LinearLayout(this);
setContentView(layoutId);
layout.setOrientation(LinearLayout.VERTICAL);
textedit = ((Activity) this).getLayoutInflater().inflate(R.layout.main,null);
layout.addView((View) appView.getParent());
layout.addView(textedit);
layout.getChildAt(0).setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1));
setContentView(layout);
res/layout/blank.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
Please Help....