-2

when i add gridview and use widget nestedscrollview xml in my project i have this problem

my problem project was work but after i use new class to add describtion in the gridview like after the user click photo open new page have site or video or anything

this code i try to right from youtube i see more than 20 video but the same problem all video old and use android.support.v4.widget.nestedscrollview in android studio i cant use this in 4.2 not support are is another code

 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="Book_Activity"
 >
 <androidx.core.widget.NestedScrollView
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_marginTop="10dp"
     android:padding="10dp">

 <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:gravity="center"
     android:orientation="vertical"
     >

 <ImageView
     android:layout_width="125dp"
     android:layout_height="170dp"
     android:background="#2d2d2d"
     android:id="@+id/bookthumbail"
     android:scaleType="centerCrop"
     ></ImageView>
 <TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="Book Title"
     android:layout_marginTop="10dp"
     android:textSize="18dp"
     android:textStyle="bold"


     ></TextView>
 <TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="Cataloge"
     android:background="#edecec"
     android:layout_marginTop="10dp"
     android:padding="8sp"></TextView>

 <TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="Description"
     android:layout_marginTop="10dp"
     android:textSize="18sp"
     ></TextView>

</LinearLayout>
 </androidx.core.widget.NestedScrollView>

</LinearLayout>```
Zoe
  • 27,060
  • 21
  • 118
  • 148
Yazan
  • 33
  • 4

1 Answers1

-1

i selove the problem it was with the main or list gridView XML file

it must to be like this:

    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/cardview_id"
    android:clickable="true"
    android:foreground="?android:attr/selectableItemBackground"
    android:layout_width="120dp"
    android:layout_height="190dp"
    android:layout_margin="5dp" </androidx.cardview.widget.CardView>```


Yazan
  • 33
  • 4