Problem in Android Fragment: Klicken Sie immer noch auf das vorherige Fragment

Ich habe eine Anwendung entwickelt, die Navigations-Schublade und viele Fragmente in der Schublade hat, sodass ich Probleme bekomme, während ich Fragmente in Fragmenten öffne. In einem Fragment habe ich die Listenansicht, wenn der Benutzer auf das Listenansicht-Element klickt Es ist immer noch auf Liste klicken, die nicht sichtbar ist, aber klicken

Layout für Fragment

 <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layoutDrawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:clickable="true"
        android:background="@drawable/backgroung"
        android:id="@+id/content_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"></FrameLayout>

    <LinearLayout
        android:id="@+id/linearDrawer"
        android:layout_width="@dimen/dp260"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/white"
        android:layout_gravity="start">

        <RelativeLayout
            android:id="@+id/userDrawer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:layout_margin="@dimen/dp10">

Code für offenes Fragment

Fragment fragment = new FragmentContactDetails();
            FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
            transaction.add(((ViewGroup) getView().getParent()).getId(), fragment);
            transaction.addToBackStack(null);
            transaction.commit();

            Bundle args = new Bundle();
            int index = adapter.arrayList.indexOf(adapter.propertyList.get(position));

            args.putInt(Constant.POSITION, index);
            Toast.makeText(getActivity(), "" + index + "----" + adapter.propertyList.get(position).getName(), Toast.LENGTH_LONG).show();
            fragment.setArguments(args);

Antworten auf die Frage(2)

Ihre Antwort auf die Frage