I am making a Tic Tac Toe application for fun in Android Studio and have a problem.If i use nexus5x for preview in layout editor my app is oriented perfect.If i change this to nexus4 or a tablet the orientation is messed up. This is a picture of what i mean. Nexus 5x as preview and Nexus 4 as preview
A sample from my xml code is the below:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.mpampis.tictactoe2.MainActivity">
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:background="@drawable/board"
android:columnCount="3"
android:rowCount="4">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView3"
android:layout_row="0"
android:layout_column="2"
android:src="@drawable/kokkinov3"
android:layout_marginTop="25dp"
android:layout_marginLeft="20dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView2"
android:layout_row="0"
android:layout_column="1"
android:src="@drawable/kokkinov3"
android:layout_marginTop="25dp"
android:layout_marginLeft="30dp"/>