android - Listview with EditText in each row , Scrollview inside FooterView of listview , adjustResize and adjustPan all working toghter -


i have 1 fragment in have listview has edittext in each row , inside footerview controls inside scrollview when set android:windowsoftinputmode="adjustpan" not scroll footerview form when softkeyboard open , push header of activity , when trying use android:windowsoftinputmode="adjustresize" scroll footer view form auto scrolling listview when item open , lost edittext focus header not move up. sorry not in explaining hope 1 undersatand want explain. want scroll scrollview specific layout in footerview face these problems 1 can me ? thank

enter image description here

here fragment xml file

<?xml version="1.0" encoding="utf-8"?> <linearlayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="@color/application_background">     <listview         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:id="@+id/card_list"         android:fadingedgelength="0dp"         android:scrollbars="none"         android:headerdividersenabled="false"         android:descendantfocusability="afterdescendants"         android:focusable="true"         android:focusableintouchmode="true"         android:listselector="@android:color/transparent"         android:footerdividersenabled="false"         android:transcriptmode="alwaysscroll" />     <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="bottom"         android:orientation="horizontal"         android:id="@+id/ll_footer"         android:gravity="center"         android:background="@color/colorindicatorfill">         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="pay 250"             android:textcolor="@color/white"             android:id="@+id/txt_pay"             android:gravity="center"             android:textsize="@dimen/fontsize_txtview_18" />     </linearlayout> </linearlayout> 

here footerview xml of listview

<?xml version="1.0" encoding="utf-8"?> <scrollview     android:layout_width="match_parent"     android:layout_height="match_parent"     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:fillviewport="true"     android:isscrollcontainer="true"     android:id="@+id/scrollview">     <linearlayout         xmlns:android="http://schemas.android.com/apk/res/android"         android:orientation="vertical"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:id="@+id/ll_footer_card"         android:padding="10dp">         <relativelayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_centervertical="true"             android:orientation="horizontal"             android:id="@+id/rl_or">             <textview                 android:id="@+id/txt_or"                 android:textsize="@dimen/fontsize_txtview_16"                 android:singleline="true"                 android:text="@string/or"                 android:gravity="center"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_centerinparent="true"                 android:textcolor="@color/coloractiveindicator"/>             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_1"                 android:layout_centervertical="true"                 android:paddingleft="@dimen/size_10"                 android:layout_toleftof="@id/txt_or"                 android:background="@color/gray_light" />             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_1"                 android:layout_centervertical="true"                 android:paddingright="@dimen/size_10"                 android:layout_torightof="@id/txt_or"                 android:background="@color/gray_light" />         </relativelayout>         <linearlayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:orientation="horizontal"             android:id="@+id/ll_choose_other_card">             <textview                 android:layout_width="0dp"                 android:layout_weight="0.9"                 android:layout_height="wrap_content"                 android:text="@string/choose_other_card"                 android:id="@+id/txt_add_new_card"                 android:textsize="@dimen/fontsize_txtview_16"                 android:textcolor="@color/coloractiveindicator"/>             <radiobutton                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/radio_add_new_crad"                 style="@style/radiobutton" />         </linearlayout>         <linearlayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:orientation="vertical"             android:id="@+id/ll_card_detail_form">             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <linearlayout                 android:layout_width="wrap_content"                 android:gravity="center"                 android:layout_gravity="center"                 android:id="@+id/ll_scan_card"                 android:layout_height="wrap_content"                 android:background="@drawable/round_corner_light_green">                 <imageview                     android:layout_width="40dp"                     android:layout_height="40dp"                     android:src="@drawable/cards"                     android:id="@+id/iv_card"                     android:scaletype="centerinside"/>                 <textview                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:text="@string/scan_card"                     android:textsize="@dimen/fontsize_txtview_16"                     android:textcolor="@color/color_white"                     android:id="@+id/txt_scan_card"/>             </linearlayout>             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <view                 android:layout_width="@dimen/size_300"                 android:layout_gravity="center"                 style="@style/dividerbottomline"/>             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <edittext                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:id="@+id/edt_card_number"                 android:hint="@string/hint_card_number"                 android:singleline="true"                 android:digits=" 1234567890"                 android:inputtype="number"                 android:maxlength="23"                 android:textcolor="@color/text_color"                 android:textcolorhint="@color/hint_color"                 android:textsize="@dimen/fontsize_edttext"                 android:background="@drawable/edt_background" />             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <textview                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:id="@+id/edt_expiry"                 android:hint="@string/hint_expiry"                 android:singleline="true"                 android:inputtype="none"                 android:imeoptions="actionnext"                 android:textcolor="@color/text_color"                 android:textcolorhint="@color/hint_color"                 android:textsize="@dimen/fontsize_edttext"                 android:background="@drawable/edt_background" />             <net.cachapa.expandablelayout.expandablelayout                 android:id="@+id/expandable_layout"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 app:el_duration="500"                 app:el_expanded="false">                 <linearlayout  android:layout_width="match_parent"                     android:layout_height="match_parent"                     android:gravity="center"                     android:id="@+id/ll_datepicker"                     android:animatelayoutchanges="true"                     android:orientation="vertical">                     <linearlayout                         android:id="@+id/main_layout"                         android:layout_width="match_parent"                         android:layout_height="wrap_content"                         android:background="@color/application_background"                         android:orientation="vertical" >                         <linearlayout                             android:id="@+id/layout_choose"                             android:layout_width="match_parent"                             android:layout_height="wrap_content"                             android:gravity="center"                             android:orientation="horizontal" >                             <kankan.wheel.widget.wheelview                                 android:id="@+id/wheel_month"                                 android:layout_width="0dp"                                 android:layout_weight="0.5"                                 android:background="@color/white"                                 android:layout_height="wrap_content" />                             <kankan.wheel.widget.wheelview                                 android:id="@+id/wheel_year"                                 android:layout_width="0dp"                                 android:layout_weight="0.5"                                 android:background="@color/white"                                 android:layout_height="wrap_content" />                         </linearlayout>                         <widget.rippleview                             android:id="@+id/ripple_confirm"                             android:layout_width="wrap_content"                             android:layout_height="wrap_content"                             android:layout_gravity="center"                             android:gravity="center"                             app:rv_centered="true"                             app:rv_color="@color/white"                             app:rv_type="simpleripple" >                             <textview                                 android:id="@+id/txt_confirm"                                 android:layout_width="wrap_content"                                 android:layout_height="wrap_content"                                 android:gravity="center"                                 android:background="@drawable/round_corner_light_green"                                 android:text="@string/btn_done"                                 android:textcolor="@color/color_white"                                 android:textsize="@dimen/fontsize_txtview_18" />                         </widget.rippleview>                     </linearlayout>                  </linearlayout>             </net.cachapa.expandablelayout.expandablelayout>             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <edittext                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:id="@+id/edt_cvv"                 android:hint="@string/hint_cvv"                 android:singleline="true"                 android:imeoptions="actionnext"                 android:inputtype="number"                 android:maxlength="4"                 android:textcolor="@color/text_color"                 android:textcolorhint="@color/hint_color"                 android:textsize="@dimen/fontsize_edttext"                 android:background="@drawable/edt_background" />             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <edittext                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:id="@+id/edt_name_on_card"                 android:hint="@string/hint_name_on_card"                 android:singleline="true"                 android:maxlength="100"                 android:textcolor="@color/text_color"                 android:textcolorhint="@color/hint_color"                 android:textsize="@dimen/fontsize_edttext"                 android:imeoptions="actiondone"                 android:background="@drawable/edt_background" />             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>             <checkbox                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/chk_save_card"                 android:textcolor="@color/text_color"                 style="@style/checkbox"                 android:textsize="@dimen/fontsize_edttext"                 android:text="@string/save_card" />             <view                 android:layout_width="match_parent"                 android:layout_height="@dimen/size_10"/>         </linearlayout>     </linearlayout> </scrollview> 

you can try removing scrollview footer , adding fragment, , can use nonscrollablelistview instead of listview.

for more reference on how use nonscrollablelistview use this:

non-scrollable listview inside scrollview

ps: hope using viewholders inside adapter listview.

cheers!


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -