Skip to content

Instantly share code, notes, and snippets.

@genuinemoses
Created August 11, 2019 04:58
Show Gist options
  • Save genuinemoses/008240e4ac54c5ecc5044ed54056c982 to your computer and use it in GitHub Desktop.
Save genuinemoses/008240e4ac54c5ecc5044ed54056c982 to your computer and use it in GitHub Desktop.
Front-end for GPA_computer - Layout_1
<?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"
tools:context=".MainActivity">
<GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:columnCount="2"
android:rowCount="4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!--Sem 1-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="16dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 1"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--sem 2-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 2"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--sem 3-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 3"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--Sem 4-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 4"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--Sem 5-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 5"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--Sem 6-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 6"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--Sem 7-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 7"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
<!--Sem 8-->
<android.support.v7.widget.CardView
android:layout_width="160dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="12dp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Semester 8"
android:textColor="@color/colorPrimaryDark"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="32dp"
android:text="7.25"
android:textColor="@color/colorPrimaryText"
android:textSize="24dp" />
</android.support.v7.widget.CardView>
</GridLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="Cummulative GPA"
android:textColor="@color/colorPrimary"
android:textSize="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="00.00 / 10"
android:textColor="@color/colorSecondary"
android:textSize="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment