'TextView not clickable in Spinner when spinner contains ImageButton

I am using below layout xml as spinner row element (custom spinner). I see items (textView and ImageButton) getting displayed in spinner, but the item is not clickable (disabled), though i can click on ImageButton. I would like to have item especially text to be shown in the spinner when text is selected. I am using android api 28. Please suggest on how to do this.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
    android:id="@+id/text1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

    <ImageButton
        android:id="@+id/buttonIcon"
        android:scaleType="centerCrop"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_action_remove"/>

</LinearLayout>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source