android - Push up content inside view pager when soft keyboard shown up -
i have gone through many answers here similar issues, non of them solved problem.
i have parent activity contains 1 header stepper indicator, viewpager container in middle , @ bottom footer next or step. inside viewpager have 3 fragments, , 1 includes recyclerview. i'm trying next: when keyboard activated want push whole content including recyclerview, footer , stepper indicator it's adjusted right.
screenshot attached below:
how looks when keyboard not activated:
and how screen looks when keyboard activated. list hidden behind keyboard. maybe scrollview here?
however, here code have used these layouts:
parent activity
<?xml version="1.0" encoding="utf-8"?>
<imageview android:id="@+id/background" android:layout_width="match_parent" android:layout_height="match_parent" android:scaletype="matrix"/> <com.solaris.timster.widgets.nonswipeableviewpager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/bottom_container" android:layout_below="@+id/stepper_indicator"/> <com.badoualy.stepperindicator.stepperindicator android:id="@+id/stepper_indicator" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="32dp" android:layout_marginright="32dp" android:layout_margintop="32dp" app:stpi_indicatorcolor="@color/coloraccent" app:stpi_linedonecolor="@color/coloraccent" app:stpi_showstepnumberinstead="true" app:stpi_stepcount="5"/> <relativelayout android:id="@+id/bottom_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:background="@color/colorprimarydark"> <com.solaris.timster.widgets.custom_font_widgets.opensansbutton android:id="@+id/btn_next" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentend="true" android:layout_alignparentright="true" android:background="@null" android:text="dalje" android:textcolor="@color/coloraccent" android:typeface="sans"/> <com.solaris.timster.widgets.custom_font_widgets.opensansbutton android:id="@+id/btn_previous" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:text="nazad" android:textcolor="@color/coloraccent" android:typeface="sans"/> </relativelayout>
fragment list
<?xml version="1.0" encoding="utf-8"?>
<com.solaris.timster.widgets.custom_font_widgets.opensansboldtextview android:id="@+id/lbl_page" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:padding="10dp" android:text="1. izaberi lokaciju" android:textcolor="@color/main_text_color" android:textsize="26sp" android:typeface="sans"/> <com.solaris.timster.widgets.custom_font_widgets.opensanstextview android:id="@+id/lbl_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/lbl_page" android:gravity="center" android:paddingbottom="5dp" android:text="u cilju lociranja ekipa terena u blizini izaberi svoju lokaciju" android:textcolor="@color/main_text_color" android:typeface="sans"/> <com.solaris.timster.widgets.custom_font_widgets.opensansedittext android:id="@+id/autocomplete_places" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/lbl_description" android:layout_gravity="center_horizontal" android:layout_margintop="20dp" android:background="@drawable/bg_search_text" android:hint="@string/autocomplete_hint" android:imeoptions="actiondone" android:lines="1" android:padding="10dp" android:textcolor="@android:color/white" android:textcolorhint="@color/main_text_color" android:textsize="16sp"/> <com.solaris.timster.widgets.custom_font_widgets.opensanstextview android:id="@+id/tv_range" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/autocomplete_places" android:gravity="center" android:padding="5dp" android:textcolor="@android:color/white"/> <progressbar android:id="@+id/progressbar" style="?android:attr/progressbarstylesmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/autocomplete_places" android:indeterminate="true" android:padding="5dp" android:visibility="invisible"/> <android.support.v7.widget.recyclerview android:layout_alignparentbottom="true" android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/tv_range" android:layout_margintop="10dp"/>
by way have set this activity:
android:windowsoftinputmode="statehidden|adjustresize"
Comments
Post a Comment