Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push view above when using custom Keyboard

I have created a custom keyboard for my android application. I have also disabled the default android keyboard. I display the keyboard as a fragment in the activity and it shows up well.

I only cannot get activity view to push above when the keyboard shows up. Is there any way that I could do this?

XML FILE

<FrameLayout
        android:id="@+id/flKeyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" />

SHOW FRAGMENT

FragmentTransaction ft = getFragmentManager().beginTransaction();
    ft.add(R.id.flKeyboard, new Keyboard()).commit();
like image 786
Anirudh Avatar asked Dec 05 '25 20:12

Anirudh


1 Answers

You can try something like this:

<RelativeLayout>  
<View
    android:id="@+id/myView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
 />  
<FrameLayout
        android:id="@+id/flKeyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/myView"
/>

</RelativeLayout>
like image 73
Shishi Avatar answered Dec 08 '25 11:12

Shishi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!