0

Having Problem with Edittext and SoftKeyboard.

This is screen where hello is edittext

now if i click on edittext(hello text) to modify it (means when it gains focus bottom gridview is poping up see second image)

enter image description here

so how to change this behaviour of poping up the bottom views?

Any Help will be greately appreciated.

Thanks in advance.

Vivo
  • 768
  • 1
  • 8
  • 20
Kalpesh Lakhani
  • 1,003
  • 14
  • 28

3 Answers3

0

you can open dialog and in dialog add EditText and on ok button you can change that text according to text added in dialog edittext.

Girish Bhutiya
  • 3,111
  • 5
  • 31
  • 50
  • there is no need dialog check this http://stackoverflow.com/questions/17410499/difference-between-adjustresize-and-adjustpan-in-android – Naveen Tamrakar Aug 30 '14 at 12:05
0

android:windowSoftInputMode="adjustResize" property might be squeezing your background use android:windowSoftInputMode="stateVisible|adjustPan" instead.

karan
  • 8,637
  • 3
  • 41
  • 78
0
View activityRootView;

activityRootView = (LinearLayout) findViewById(R.id.root); // main layout id


activityRootView.getViewTreeObserver().addOnGlobalLayoutListener(
                new OnGlobalLayoutListener() {
                    @Override
                    public void onGlobalLayout() {
                        int heightDiff = activityRootView.getRootView()
                                .getHeight() - activityRootView.getHeight();
                        if (heightDiff > 100) {
                            // if more than 100 pixels, its

                            // hide your below layout like layout1.setVisibility(View.GONE);

                        } else {
                         // visible your below layout like layout1.setVisibility(View.VISIBLE);


                        }
                    }
                });
Dakshesh Khatri
  • 639
  • 7
  • 12