Android列表视图里面的列表项重复状态

时间:2015-07-27 13:57:43

标签: android android-layout android-listview

我在List Item中有ListView。当我点击listview时,我得不到任何回复。我需要这个listview重复列表项的状态。 图片: enter image description here

以下是代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:descendantFocusability="blocksDescendants"
android:background="@android:color/white">

<LinearLayout
    android:id="@+id/kind_a_main_lay"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:weightSum="10">

    <RelativeLayout
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="5.20">

        <TextView
            android:id="@+id/user_name_TextView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="Name S."
            android:layout_marginBottom="5dp"
            android:textSize="16sp"
            android:textIsSelectable="false" />

        <ListView
            android:id="@+id/user_way_points_ListView"
            android:layout_width="wrap_content"
            android:layout_height="90dp"
            android:divider="#00000000"
            android:dividerHeight="0dp"
            android:scrollbars="none"
            android:listSelector="@android:color/transparent"
            android:layout_below="@id/user_name_TextView">
        </ListView>


    </RelativeLayout>

 </LinearLayout>

ListView lvMain = (ListView) rootView.findViewById(R.id.main_driver_order_fragment_list);
    driverOrderListAdapter = new DriverOrderListAdapter(getActivity(), modelOrders);
    lvMain.setAdapter(driverOrderListAdapter);
    lvMain.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Intent intent = new Intent(getActivity(), DriverChatListActivity.class);
            getActivity().startActivity(intent);
        }
    });

我如何才能将此列表视图作为列表项的一部分进行点击?

谢谢!

0 个答案:

没有答案