have designed my layout to match and fit all the designs in xml but unfortunately am experiencing the un balanced layout of course i know using raw figures is not advices now how can i achieve this layout to match all my screen devices using xml.
""Here is my code snippet but that does not match all devices especially with bigger screens""
<?xml version="1.0" encoding="utf-8"?>
<!--Home Fragment layout-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:id="@+id/layoutonescholarship"
android:background="@drawable/home_box"
android:layout_width="match_parent"
android:layout_height="200dp">
<TextView
android:id="@+id/text1"
android:layout_marginLeft="20dp"
android:textSize="35sp"
android:layout_marginTop="40dp"
android:text="@string/scholarshiptoday"
android:fontFamily="sans-serif-black"
android:textColor="@color/colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_marginLeft="-280dp"
android:layout_marginTop="65dp"
android:textColor="@color/colorAccent"
android:fontFamily="sans-serif"
android:text="@string/seescholarship"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="110dp"
android:id="@+id/scholarhip"
android:layout_width="match_parent"
android:layout_height="250dp"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:orientation="horizontal"
tools:listitem="@layout/scholarship_item_card_"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:id="@+id/recyclerViewscholarship"
android:layout_height="match_parent"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:layout_below="@id/scholarhip"
android:id="@+id/jobsandinterns"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_marginLeft="15dp"
android:textColor="@color/colorPrimary"
android:textSize="25sp"
android:fontFamily="sans-serif-black"
android:id="@+id/jobsandinternstitle"
android:layout_width="wrap_content"
android:text="@string/jobsandinterns"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/browsetitle"
android:layout_below="@id/jobsandinterns"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:textSize="12sp"
android:textColor="@color/colorPrimary"
android:layout_marginLeft="19dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/browse"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="5dp"
android:id="@+id/jobsandinternsbannerimage"
android:layout_below="@id/browsetitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:orientation="horizontal"
tools:listitem="@layout/jobsandintern_tem"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:id="@+id/recyclerViewjobsandinterns"
android:layout_height="match_parent"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="5dp"
android:layout_below="@id/jobsandinternsbannerimage"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_gravity="center"
android:src="@drawable/banner2020"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</RelativeLayout>