Commit 7ad90241 authored by Christopher League's avatar Christopher League
Browse files

Landscape works well

parent 93ced759
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.GridLayout
android:id="@+id/grid"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="10dp"
app:columnCount="2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
<View
android:id="@+id/sample1"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/colorPrimary"
app:layout_columnWeight="1"
app:layout_rowWeight="1" />
<View
android:id="@+id/sample2"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/colorAccent"
app:layout_columnWeight="1"
app:layout_rowWeight="1" />
<View
android:id="@+id/sample3"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/colorPrimaryDark"
app:layout_columnWeight="1"
app:layout_rowWeight="1" />
<View
android:id="@+id/sample4"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/colorPrimary"
app:layout_columnWeight="1"
app:layout_rowWeight="1" />
</android.support.v7.widget.GridLayout>
<LinearLayout
android:id="@+id/buttonBar"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="8dp"
android:orientation="vertical"
android:padding="@dimen/default_gap"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/color_buttons"/>
</LinearLayout>
<TextView
android:id="@+id/num_moves"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:gravity="center_horizontal"
android:maxLines="2"
android:scrollHorizontally="false"
android:text="numMoves"
android:textSize="30sp"
app:fontFamily="sans-serif-black"
app:layout_constraintBottom_toTopOf="@+id/buttonBar"
app:layout_constraintEnd_toStartOf="@+id/buttonBar"
app:layout_constraintStart_toEndOf="@+id/grid"
app:layout_constraintTop_toBottomOf="@+id/grid" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -63,83 +63,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button"/>
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<include layout="@layout/color_buttons"/>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<edu.liu.floodgame.ColorButton
android:layout_width="@dimen/color_button"
android:layout_height="@dimen/color_button"/>
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</merge>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment