android - How to make sure specific view is visible when keyboard appears? -


i have layout graphic @ top, edittext in middle , button distance below it, so:

example layout

when user typing in edittext, want pan layout "go" button still visible, if means clipping image off top, so:

wanted layout

i know windowsoftinputmode="adjustpan" in manifest, doesn't work because pans far enough edittext visible. there way make sure pans until button visible too?


for comments k_anas, layout. has margins , spacing removed compared first screenshot, remove other source of problems.

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent">      <view         android:layout_width="300dp"         android:layout_height="150dp"         android:layout_alignparenttop="true"         android:background="#999"/>      <edittext         android:layout_width="280dp"         android:layout_height="wrap_content"         android:layout_centerinparent="true"         android:hint="sample..."/>      <button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:text="go"/>  </relativelayout> 

spoke android developers hangout, , doesn't seem there's easy way solve problem. consensus seems reworking layout rather having api fix issue.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -