0

In the List Activity whenever i click on any item it works fine but when i click outside the working layout(like media player), List activity scroll screen to the top most item.(this is annoying when we have list more than 10 item). so anyone please tell if this is the property of List activity and how can i override this.. Thanks.

xml code of my list activity is:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#ffffff" >

<LinearLayout
    android:id="@+id/side_navigation_menu"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_alignParentRight="true"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/text1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/top_bar"

        android:textColor="#ffffff"
        android:text="@string/app_name"
         android:gravity="center"
        android:textStyle="bold"
        android:textSize="@dimen/side_navigation_item_text_size" />

    <ListView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/listView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#ffffff"

        android:divider="@color/side_navigation_list_divider_color"
        android:dividerHeight="1dp" />
</LinearLayout>

6
  • please give me xml code.. Jan 8, 2013 at 5:09
  • @MaheshKavathiya- i edit my post.have a look .
    – Manish
    Jan 8, 2013 at 5:13
  • please give me full xml code, because your outside meadia player xml code i can't find them.. Jan 8, 2013 at 5:17
  • that code has actually no concern here.it is just like any dialog box we use on click of any item.
    – Manish
    Jan 8, 2013 at 5:28
  • so please remove your listview android:layout_height="fill_parent" and set fix size to what you want.. Jan 8, 2013 at 5:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.