0

リスト アクティビティでは、任意のアイテムをクリックするたびに正常に動作しますが、作業レイアウトの外 (メディア プレーヤーなど) をクリックすると、リスト アクティビティのスクロール画面が一番上のアイテムに移動します。 . これがリストアクティビティのプロパティであるかどうか、またどうすればこれをオーバーライドできるかを教えてください..ありがとう。

私のリストアクティビティのxmlコードは次のとおりです。

<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>

4

0 に答える 0