Please help me in customizing like in the image
Below is my grid_mainborders.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:drawable="@drawable/grid_two_borderselected"
/> <!-- focused -->
<item android:state_focused="false"
android:drawable="@drawable/grid_two_bordernormal"/>
</selector>
Below is my grid_two_borderselected.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="@android:color/holo_blue_light" />
<padding android:left="7dp" android:top="7dp"
android:right="7dp" android:bottom="7dp" />
<corners android:radius="3dp" />
</shape>
Below is my grid_two_bordernormal.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="@android:color/white" />
<padding android:left="7dp" android:top="7dp"
android:right="7dp" android:bottom="7dp" />
<corners android:radius="3dp" />
</shape>
Below is my GridView Item file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="2dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="2dp"
android:background="@drawable/grid_mainborders">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cardViewGridLangsItem"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/grid_mainborders">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="10dp">
<TextView
android:id="@+id/tvMaintext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="English"
android:textSize="26sp"
android:padding="5dp"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvSubText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="English"
android:textSize="20sp"
android:padding="5dp"/>
<TextView
android:id="@+id/tvAlphabet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="E"
android:textSize="38sp"
android:padding="5dp"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
I am using gridview with base adapter, I have tried with few links but almost background is changing not with the corners. Please help me on this Thanks in advance
