First of all...It just like a trick...Add the following code in your layout
<RelativeLayout android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:gravity="center"> <Button android:id="@+id/sendMsgButton" android:layout_width="fill_parent" android:layout_height="40dp" android:layout_margin="0dp" android:layout_marginBottom="20dp" android:layout_marginTop="20dp" android:background="#FF9800" android:text="This button" android:textSize="20dp" android:textColor="#ffffff" /> </RelativeLayout>
Then dynamically show or hide this(in keyboard listener) by using hese 2 code on the right places:
button.setVisibility(View.VISIBLE) button.setVisibility(View.INVISIBLE)