java - Android Soft Keyboard Overlapping Buttons (Screenshot) -
i using sherlock action tabs , consequently have fragment activity tab. unfortunately, when keyboard appears next happens:
the keyboard overlaps 2 buttons straight below 3rd text box. however, want 2 buttons in view when keyboard open.
i have tried couple of things:
addedandroid:windowsoftinputmode="adjustresize"
android:windowsoftinputmode="adjustpan"
activity houses these 3 tabs wrapped illustrated tab fragment in scroll view partially works allowing screen scrollable view 2 buttons this xml fragment:
<scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ebebeb" android:orientation="vertical" > <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_margintop="20dp" android:layout_weight="1" android:gravity="right" > <edittext android:id="@+id/textbox" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff" android:height="50dp" android:hint="@string/boxhint" android:paddingleft="15dp" > </edittext> <textview android:id="@+id/locboxhint" android:layout_width="50dp" android:layout_height="50dp" android:layout_below="@+id/textbox" android:background="#ffffff" android:gravity="center" android:padding="10dp" android:text="\@" android:textsize="22dp" /> <edittext android:id="@+id/locbox" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_below="@+id/textbox" android:layout_torightof="@+id/locboxhint" android:background="#ffffff" android:hint="joey's pizza" > </edittext> <textview android:id="@+id/datetimeboxhint" android:layout_width="50dp" android:layout_height="50dp" android:layout_below="@+id/locboxhint" android:background="#ffffff" android:gravity="center" android:padding="10dp" android:text="#" android:textsize="22dp" /> <edittext android:id="@+id/datetimebox" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_below="@+id/locbox" android:layout_torightof="@+id/datetimeboxhint" android:background="#ffffff" android:hint="friday 8pm" android:paddingright="60dp" android:layout_marginbottom="50dp" /> <imagebutton android:id="@+id/datetimepicker" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignparentright="true" android:layout_below="@+id/locbox" android:onclick="datetimebutton" android:src="@drawable/ic_menu_today" android:background="#ffffff" /> <linearlayout android:layout_width="fill_parent" android:layout_height="50dp" android:layout_below="@+id/datetimebox" android:orientation="horizontal" android:layout_margintop="-50dp" > <button android:id="@+id/infobutton" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_weight="5" android:onclick="infobutton" android:text="i" android:textcolor="#ffffff" /> <button android:id="@+id/button" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_weight="2" android:onclick="planbutton" android:text="@string/button" android:textcolor="#ffffff" /> </linearlayout> </relativelayout> </linearlayout>
any thoughts?
your parent layout linear alter in relative layout next code
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/theme_black_bg" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@+id/bottom_bar" android:layout_below="@+id/top_bar" android:layout_margintop="15dip" android:gravity="center_horizontal" android:orientation="vertical" > <linearlayout android:id="@+id/linearlayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/email_edit_bg" android:gravity="center_horizontal" android:orientation="vertical" > <edittext android:id="@+id/loginemailaddressedittextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:background="@drawable/edit_text_bg" android:ems="2" android:hint="please come in email" android:paddingleft="5dip" android:paddingright="5dip" android:focusable="true" android:focusableintouchmode="true" android:singleline="true" android:textcolor="@color/label_color_white" android:textcolorhint="#ffffffff" android:textsize="12sp" /> </linearlayout> <imageview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginbottom="10dip" android:layout_margintop="10dip" android:background="@drawable/separator_bg" /> <edittext android:id="@+id/loginpasswordedittextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/edit_text_bg" android:ems="2" android:hint="@string/hint_password" android:inputtype="textpassword" android:paddingleft="5dip" android:paddingright="5dip" android:singleline="true" android:textcolor="@color/label_color_white" android:textcolorhint="#ffffffff" android:textsize="12sp" /> <button android:id="@+id/loginscreenloginbutton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="10dip" android:background="@drawable/login_btn_selector" /> <imageview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginbottom="10dip" android:layout_margintop="10dip" android:background="@drawable/separator_bg" /> <button android:id="@+id/loginscreenforgotpasswordbutton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="10dip" android:background="@drawable/forgot_password_btn_selector" /> </linearlayout> <include android:id="@+id/bottom_bar" android:layout_alignparentbottom="true" layout="@layout/bottom_advertisement_merge_layout" /> </relativelayout>
java android xml android-layout actionbarsherlock
No comments:
Post a Comment