다음은 활동 (예 : 테스트)을 통해 클릭 연결되는 목록 조각을 설정하는 첫 번째 코드입니다. 다음 위치의 Android 문서 예제를 따랐습니다 : List Fragment ExampleonListItemClick은 "never used"로 표시됩니다.
그러나 onListItemClick은 "never used"로 표시됩니다. 나는 응용 프로그램을 실행하면 내 목록이 나타납니다,하지만 난 그것의 항목을 클릭하면 난 그냥 반환 된 다음 얻을 :
D/ViewRootImpl : ViewPostImeInputStage ACTION_DOWN
는 XML :
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.administrationuser.piclo.ListViewFragment"
tools:showIn="@layout/activity_list_view"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="0dp"
>
<FrameLayout
android:id="@+id/list_container_id"
android:layout_width="0dp"
android:layout_height="0dp"
tools:layout_editor_absoluteY="8dp"
tools:layout_editor_absoluteX="8dp">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" >
</ListView>
</FrameLayout>
</android.support.constraint.ConstraintLayout>
을 여기에 목록 조각이 있습니다 :