Hi i am new for android and in my app i am working on FrameLayout
My problem is i want to design my screen like my below image 1
but according to my code i am getting like my below image 2 please help me how can do this
my code:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="250dp"
android:orientation="horizontal"
android:weightSum="3">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/splash"
android:padding="5dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
</FrameLayout>
<TextView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="top|right"
android:layout_marginRight="-20dp"
android:layout_marginTop="-10dp"
android:background="@android:color/holo_orange_dark"
android:gravity="center"
android:text="1"
android:textColor="@android:color/white" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="30dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/splash"
android:padding="5dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
</FrameLayout>
<TextView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="top|right"
android:layout_marginRight="-20dp"
android:layout_marginTop="-10dp"
android:background="@android:color/holo_orange_dark"
android:gravity="center"
android:text="2"
android:textColor="@android:color/white" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="30dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/splash"
android:padding="5dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
</FrameLayout>
<TextView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="top|right"
android:layout_marginRight="-20dp"
android:layout_marginTop="-10dp"
android:background="@android:color/holo_orange_dark"
android:gravity="center"
android:text="3"
android:textColor="@android:color/white" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="30dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/splash"
android:padding="5dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
</FrameLayout>
<TextView
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="top|right"
android:layout_marginRight="-20dp"
android:layout_marginTop="-10dp"
android:background="@android:color/holo_orange_dark"
android:gravity="center"
android:text="4"
android:textColor="@android:color/white" />
</FrameLayout>
</LinearLayout>
</LinearLayout>