How To Increase Or Decrease Image Size Gridview?
How to increase the image size in these.These have silk to give image text with recyleview array.The grid size of these should be large.How to grid size increase. Example row_ite
Solution 1:
Here I am using AndroidX for CardView, but you can also use support library for this.
<?xml version="1.0" encoding="utf-8"?><androidx.cardview.widget.CardViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:card_view="http://schemas.android.com/apk/res-auto"android:id="@+id/cardView"android:layout_width="110dp"android:layout_height="150dp"android:layout_margin="4dp"card_view:cardCornerRadius="8dp"><RelativeLayoutandroid:id="@+id/relativeLayout"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_gravity="center"android:background="@color/blue"android:orientation="vertical"><ImageViewandroid:id="@+id/imageView"android:layout_width="30dp"android:layout_height="30dp"android:layout_centerInParent="true"android:src="@drawable/ic_menu_camera"android:contentDescription="@null" /><TextViewandroid:id="@+id/textView"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@+id/imageView"android:layout_centerHorizontal="true"android:text="Item"android:textColor="@android:color/white" /></RelativeLayout></androidx.cardview.widget.CardView>
Solution 2:
set it at Width and Height attributes of the image.
Post a Comment for "How To Increase Or Decrease Image Size Gridview?"