Reputation: 2010
when i click the textview its opens the list item popup activity but i set textview android:clickable="false"
is not working so how to i disable the click of FrameLayout Child views
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
android:clickable="true"
android:fadingEdge="none"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:orientation="vertical">
<TextView
android:id="@+id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:text="Text"/>
</LinearLayout>
</FrameLayout>
Upvotes: 1
Views: 1470
Reputation: 6942
As you want TextView
to scroll with ListView as last time the best way is to add that View as footer of the ListView
TextView mFooterTextView = new TextView(mContext);
listView.addFooterView(footerView);
and your XML will be
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
android:clickable="true"
android:fadingEdge="none"/>
</FrameLayout>
Upvotes: 1