title: cardview in gridview not clickable
body: <p>i have a problem with cardview
  cardview in adnroid gridlayout not clickable
  only general cardview is clickable and the other notclickable</p>
  <p>here is xml code</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.ui.fragments.CategoriesFragment&quot;&gt;
  
  
      &lt;TextView
          android:id=&quot;@+id/title_view&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_margin=&quot;12dp&quot;
          android:text=&quot;@string/category&quot;
          android:textColor=&quot;#5950E4&quot;
          android:textSize=&quot;30sp&quot;
          android:textStyle=&quot;bold&quot; /&gt;
  
      &lt;GridLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:layout_below=&quot;@id/title_view&quot;
          android:layout_margin=&quot;30dp&quot;
          android:columnCount=&quot;2&quot;
          android:rowCount=&quot;3&quot;
          &gt;
  
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/genral_category&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;0&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;0&quot;
              android:layout_columnWeight=&quot;1&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              android:clickable=&quot;true&quot;
              app:cardUseCompatPadding=&quot;true&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_border_all_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;General&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.cardview.widget.CardView&gt;
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/sports_category&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;0&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;1&quot;
              android:layout_columnWeight=&quot;1&quot;
              android:clickable=&quot;true&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              app:cardUseCompatPadding=&quot;true&quot;
              &gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:duplicateParentState=&quot;true&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_sports_soccer_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;Sports&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.cardview.widget.CardView&gt;
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/technology_category&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;1&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;0&quot;
              android:clickable=&quot;true&quot;
              android:layout_columnWeight=&quot;1&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              app:cardUseCompatPadding=&quot;true&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_technology_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;Technology&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.cardview.widget.CardView&gt;
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/business_category&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;1&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;1&quot;
              android:layout_columnWeight=&quot;1&quot;
              android:clickable=&quot;true&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              app:cardUseCompatPadding=&quot;true&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_business_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;Business&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.cardview.widget.CardView&gt;
  
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/health_categity&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;2&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;0&quot;
              android:layout_columnWeight=&quot;1&quot;
              android:clickable=&quot;true&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              app:cardUseCompatPadding=&quot;true&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_healing_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;Health&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.cardview.widget.CardView&gt;
  
          &lt;androidx.cardview.widget.CardView
              android:id=&quot;@+id/science_category&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_row=&quot;2&quot;
              android:layout_rowWeight=&quot;1&quot;
              android:layout_column=&quot;1&quot;
              android:layout_columnWeight=&quot;1&quot;
              app:cardCornerRadius=&quot;8dp&quot;
              app:cardElevation=&quot;8dp&quot;
              android:clickable=&quot;true&quot;
              app:cardUseCompatPadding=&quot;true&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_gravity=&quot;center_vertical|center_horizontal&quot;
                  android:gravity=&quot;center&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:src=&quot;@drawable/ic_baseline_science_24&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:text=&quot;Science&quot;
                      android:textAlignment=&quot;center&quot;
                      android:textColor=&quot;@color/black&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/androidx.cardview.widget.CardView&gt;
      &lt;/GridLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/HbULV.png" rel="nofollow noreferrer">xml</a></p>
  <p>i have a problem with cardview
  cardview in adnroid gridlayout not clickable
  only general cardview is clickable and the other notclickable</p>
  <p>here is xml code</p>