I am creating a new project where I am using a listview inside a scroll view.But I got an issue where when I open this page by default it goes to the bottom of the page where I set my listview. But my requirement is that When I open the page it should show the top of the page..pls help me..
my xml
<FrameLayout 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"
tools:context="com.example.test.Product_description"
>
<!--android:background="@drawable/bg_products"-->
<!-- TODO: Update blank fragment layout -->
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="100dp"
android:layout_marginTop="10dp"
android:fillViewport="false" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#ccffffff"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="horizontal" >
<ImageView
android:id="@+id/iv_proDesc_mainImage"
android:layout_width="fill_parent"
android:layout_height="250dp"
/>
<!-- android:background="@drawable/to_be_deleted_1"-->
<TextView
android:id="@+id/tv_proDesc_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="center"
android:text="$ 9.95"
android:textColor="#ffffff"
android:textSize="28dp" />
<!--android:background="@drawable/bg_price"-->
</RelativeLayout>
<TextView
android:id="@+id/tv_proDesc_productName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp"
android:text="Premium Cherry Soup"
android:textColor="#d58001"
android:textSize="26sp" />
<TextView
android:id="@+id/tv_proDesc_productDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book." />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_marginTop="20dp"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_proDesc_wishlist"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_weight="2"
android:paddingLeft="10dp"
android:text="Wishlist"
android:textColor="#ffffff" />
<!-- android:background="@drawable/btn_wishlist"
android:drawableLeft="@drawable/heart"-->
<Button
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="#00ffffff" />
<Button
android:id="@+id/btn_proDesc_addtocart"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_gravity="left|center_vertical"
android:layout_weight="2"
android:drawablePadding="5dp"
android:includeFontPadding="true"
android:paddingLeft="10dp"
android:text="Add to Cart"
android:textColor="#ffffff" />
<!--android:background="@drawable/btn_addtocart"
android:drawableLeft="@drawable/cart"-->
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:autoText="false"
android:text="Reviews"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000"
android:textIsSelectable="true"
android:translationZ="10dp" />
<RatingBar
android:id="@+id/rB_proDesc_rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:isIndicator="true"
android:numStars="6"
android:rating="4"
android:stepSize="1" />
<!--style="@style/foodRatingBar"-->
<LinearLayout
android:id="@+id/lL_proDesc_userReviews"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical" >
</LinearLayout>
<ListView
android:id="@+id/listcomment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:transcriptMode="alwaysScroll"
>
</ListView>
</LinearLayout>
</ScrollView>