android - last item in the listview inside view pager does not appear correctly -
in android application used list view inside viewpager last item not appear full item, scroll befor last item appear shown in screenshot
message_item.xml
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" > <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:layout_margintop="7dp" android:layout_marginleft="8dp" android:layout_marginright="8dp" android:layout_marginbottom="1dp" android:elevation="1.4dp" android:foreground="?android:attr/selectableitembackground" > <imageview android:id="@+id/message_icon" android:layout_width="70dp" android:layout_height="50dp" android:src="@drawable/inbox_photo" android:layout_alignparentright="true" android:layout_centervertical="true" android:paddingright="8dp" android:paddingleft="8dp" android:contentdescription="message icon" /> <textview android:id="@+id/sender_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="@color/primarytext" android:textsize="16sp" android:layout_toleftof="@id/message_icon" android:layout_alignparentleft="true" android:paddingleft="8dp" android:paddingtop="8dp" /> <textview android:id="@+id/time_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/sender_label" android:textcolor="@color/seconderytexy" android:textsize="12sp" android:layout_alignparentleft="true" android:paddingleft="8dp" android:paddingtop="8dp" android:paddingbottom="8dp" android:text="sample" /> </relativelayout> </linearlayout>
inbox_fragment.xml
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.swiperefreshlayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/swiperefreshlayout" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:scrollbaralwaysdrawverticaltrack="true"> <listview android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:paddingbottom="8dp" android:cliptopadding="false"> </listview> </android.support.v4.widget.swiperefreshlayout> <textview android:id="@android:id/empty" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/empty_inbox" /> </relativelayout>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" tools:context="com.fadi.fadiqua.follow.mainactivity"> <android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingtop="@dimen/appbar_padding_top" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:layout_scrollflags="scroll|enteralways" app:popuptheme="@style/apptheme.popupoverlay"> </android.support.v7.widget.toolbar> <android.support.design.widget.tablayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabmode="fixed" android:isscrollcontainer="true" android:scrollbaralwaysdrawverticaltrack="true" android:nestedscrollingenabled="true" /> </android.support.design.widget.appbarlayout> <android.support.v4.view.viewpager android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <android.support.design.widget.floatingactionbutton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_margin" android:src="@drawable/ic_camera_alt_black_24dp" app:layout_anchor="@id/container" app:layout_anchorgravity="bottom|right|end" /> </android.support.design.widget.coordinatorlayout>
Comments
Post a Comment