Commit 6567de36 authored by christopher.foster's avatar christopher.foster

Car Selection Screen added, no functionality

parent c115fbd7
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".Carlist"></activity> <activity android:name=".carPurchase"></activity>
<activity android:name=".Carlist" />
<activity android:name=".login" /> <activity android:name=".login" />
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
......
...@@ -2,7 +2,9 @@ package com.example.assignment; ...@@ -2,7 +2,9 @@ package com.example.assignment;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
public class Carlist extends AppCompatActivity { public class Carlist extends AppCompatActivity {
...@@ -11,4 +13,9 @@ public class Carlist extends AppCompatActivity { ...@@ -11,4 +13,9 @@ public class Carlist extends AppCompatActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_carlist); setContentView(R.layout.activity_carlist);
} }
public void purchase(View v)
{
Intent orderScreen = new Intent(this,carPurchase.class);
startActivity(orderScreen);
}
} }
...@@ -59,8 +59,5 @@ public class MainActivity extends AppCompatActivity { ...@@ -59,8 +59,5 @@ public class MainActivity extends AppCompatActivity {
startActivity(loginScreen); startActivity(loginScreen);
} }
public void registerBtn (View v)
{
}
} }
package com.example.assignment;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class carPurchase extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_car_purchase);
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".carPurchase">
<TextView
android:id="@+id/benzStat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Available"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView26" />
<TextView
android:id="@+id/audiStat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Available"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/jagStat" />
<TextView
android:id="@+id/jagStat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Available"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/honStat" />
<TextView
android:id="@+id/honStat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Available"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toyStat" />
<TextView
android:id="@+id/toyStat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Available"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/benzStat" />
<TextView
android:id="@+id/textView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="90dp"
android:layout_marginLeft="90dp"
android:layout_marginTop="38dp"
android:text="Order Details"
android:textColor="#000"
android:textSize="40sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="20dp"
android:text="Car"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView24" />
<TextView
android:id="@+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="Status"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView24" />
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="25dp"
android:text="Benz"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView25" />
<TextView
android:id="@+id/textView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="15dp"
android:text="Audi"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView30" />
<TextView
android:id="@+id/textView29"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="15dp"
android:text="Honda"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView28" />
<TextView
android:id="@+id/textView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="15dp"
android:text="Toyota"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView27" />
<TextView
android:id="@+id/textView30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="15dp"
android:text="Jaguar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView29" />
<EditText
android:id="@+id/carChoice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:layout_marginEnd="92dp"
android:layout_marginRight="92dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/audiStat" />
<TextView
android:id="@+id/textView37"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="92dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:text="Car Choice"
app:layout_constraintEnd_toStartOf="@+id/carChoice"
app:layout_constraintTop_toBottomOf="@+id/textView31" />
<Button
android:id="@+id/carSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:layout_marginEnd="174dp"
android:layout_marginRight="174dp"
android:text="Select"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/carChoice" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -297,4 +297,16 @@ air conditioning, ABS brakes, 2 people " ...@@ -297,4 +297,16 @@ air conditioning, ABS brakes, 2 people "
android:textSize="11sp" android:textSize="11sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView11" /> app:layout_constraintTop_toBottomOf="@+id/textView11" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="155dp"
android:layout_marginLeft="155dp"
android:layout_marginTop="40dp"
android:onClick="purchase"
android:text="Purchase!"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView17" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ 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