Question

I would like to know that is there any way to do in android like this question. I used ListView and add the EditText in it. I got same problem as above question. I cann't find the answer in android.

Thanks.

Was it helpful?

Solution

In your manifest, try this

<activity android:name=".MyActivity" android:label="@string/app_name" android:windowSoftInputMode="adjustPan">

</activity>

What you need is android:windowSoftInputMode="adjustPan"

Try!

OTHER TIPS

I had the same problem with the keyboard overlapping the listview, but android:windowSoftInputMode="adjustPan" didn't work for me.

However, android:windowSoftInputMode="adjustResize" did.

<activity android:name=".MyActivity" android:label="@string/app_name" android:windowSoftInputMode="adjustResize">

smoothScrollToPosition method of LilstView class

If it's a kind of sms list view, this could be achieved by adding in the manifest this line:

android:windowSoftInputMode="adjustResize"

and adding a touch listener to edit view:

myEditView.setOnTouchListener(new OnTouchListener() {
        public boolean onTouch(View v, MotionEvent event) {

                myView.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        myListView.setSelection(myAdapter.getCount());
                    }
                }, 500);        

            return false;
        }
    });

and

@Override
protected void onResume()
{

    myEditView.postDelayed(new Runnable() {
                @Override
                public void run() {
                    myListView.setSelection(myAdapter.getCount());
                }
            }, 500);    
    super.onResume();
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top