@@ -9,7 +9,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.example.myapp_1"
|
applicationId = "com.example.myapp_1"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 34
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0"
|
versionName = "1.0"
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
implementation("com.google.android.material:material:1.10.0")
|
implementation("com.google.android.material:material:1.11.0")
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
implementation("com.google.android.gms:play-services-maps:18.2.0")
|
implementation("com.google.android.gms:play-services-maps:18.2.0")
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
|
|||||||
@@ -2,10 +2,17 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.myapp_1">
|
package="com.example.myapp_1">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
|
<service
|
||||||
|
android:name=".FetchArrival"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="true"></service>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".Predict"
|
android:name=".Predict"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|||||||
20
app/src/main/java/com/example/myapp_1/DB/Arrival.java
Normal file
20
app/src/main/java/com/example/myapp_1/DB/Arrival.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package com.example.myapp_1.DB;
|
||||||
|
|
||||||
|
public class Arrival
|
||||||
|
{
|
||||||
|
public String getArrivalTime()
|
||||||
|
{
|
||||||
|
return arrivalTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArrivalTime(String arrivalTime)
|
||||||
|
{
|
||||||
|
this.arrivalTime = arrivalTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String arrivalTime;
|
||||||
|
Arrival(String time) {
|
||||||
|
this.arrivalTime = time;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
17
app/src/main/java/com/example/myapp_1/DB/GetArrivals.java
Normal file
17
app/src/main/java/com/example/myapp_1/DB/GetArrivals.java
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package com.example.myapp_1.DB;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
public interface GetArrivals
|
||||||
|
{
|
||||||
|
//Specify the request type and pass the relative URL//
|
||||||
|
|
||||||
|
@GET("/arrivals/all")
|
||||||
|
|
||||||
|
//Wrap the response in a Call object with the type of the expected result//
|
||||||
|
|
||||||
|
Call<List<Arrival>> getAllArrivals();
|
||||||
|
}
|
||||||
|
|
||||||
31
app/src/main/java/com/example/myapp_1/DB/RetrofitClient.java
Normal file
31
app/src/main/java/com/example/myapp_1/DB/RetrofitClient.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package com.example.myapp_1.DB;
|
||||||
|
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
|
|
||||||
|
public class RetrofitClient {
|
||||||
|
|
||||||
|
private static Retrofit retrofit;
|
||||||
|
|
||||||
|
//Define the base URL//
|
||||||
|
|
||||||
|
private static final String BASE_URL = "https://localhost:8080";
|
||||||
|
|
||||||
|
//Create the Retrofit instance//
|
||||||
|
|
||||||
|
public static Retrofit getRetrofitInstance() {
|
||||||
|
if (retrofit == null) {
|
||||||
|
retrofit = new retrofit2.Retrofit.Builder()
|
||||||
|
.baseUrl(BASE_URL)
|
||||||
|
|
||||||
|
//Add the converter//
|
||||||
|
|
||||||
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
|
|
||||||
|
//Build the Retrofit instance//
|
||||||
|
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
return retrofit;
|
||||||
|
}
|
||||||
|
}
|
||||||
63
app/src/main/java/com/example/myapp_1/FetchArrival.java
Normal file
63
app/src/main/java/com/example/myapp_1/FetchArrival.java
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
package com.example.myapp_1;
|
||||||
|
|
||||||
|
|
||||||
|
import android.app.Service;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.example.myapp_1.DB.Arrival;
|
||||||
|
import com.example.myapp_1.DB.GetArrivals;
|
||||||
|
import com.example.myapp_1.DB.RetrofitClient;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
|
||||||
|
public class FetchArrival extends Service
|
||||||
|
{
|
||||||
|
private static final String TAG = "MyActivity";
|
||||||
|
@Override
|
||||||
|
public int onStartCommand(Intent intent, int flags, int Startid) {
|
||||||
|
GetArrivals apiService = RetrofitClient.getRetrofitInstance().create(GetArrivals.class);
|
||||||
|
Call<List<Arrival>> call = apiService.getAllArrivals();
|
||||||
|
//Execute the request asynchronously//
|
||||||
|
|
||||||
|
call.enqueue(new Callback<List<Arrival>>() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Handle a successful response//
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<Arrival>> call, Response<List<Arrival>> response) {
|
||||||
|
SharedPreferences sp = getApplicationContext().getSharedPreferences("UserData", MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
// Log.d(TAG, response.body().toString());
|
||||||
|
editor.putString("response", response.body().toString());
|
||||||
|
}
|
||||||
|
//Handle execution failures//
|
||||||
|
|
||||||
|
public void onFailure(Call<List<Arrival>> call, Throwable throwable) {
|
||||||
|
System.out.println("A");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Display the retrieved data as a list//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return START_NOT_STICKY;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IBinder onBind(Intent intent)
|
||||||
|
{
|
||||||
|
// TODO: Return the communication channel to the service.
|
||||||
|
throw new UnsupportedOperationException("Not yet implemented");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.example.myapp_1;
|
package com.example.myapp_1;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
@@ -20,6 +23,7 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_home);
|
setContentView(R.layout.activity_home);
|
||||||
|
|
||||||
|
ImageView vec_back = findViewById(R.id.homeBackButton);
|
||||||
BottomNavigationView bottomNavigationView = findViewById(R.id.homeBottomView);
|
BottomNavigationView bottomNavigationView = findViewById(R.id.homeBottomView);
|
||||||
bottomNavigationView.setOnNavigationItemSelectedListener(
|
bottomNavigationView.setOnNavigationItemSelectedListener(
|
||||||
new BottomNavigationView.OnNavigationItemSelectedListener() {
|
new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||||
@@ -42,6 +46,20 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
TextView userGreeting = findViewById(R.id.userGreeting);
|
||||||
|
SharedPreferences currentUserThings = getApplicationContext().getSharedPreferences("UserData", MODE_PRIVATE);
|
||||||
|
String user = currentUserThings.getString("username", "");
|
||||||
|
if (user != null)
|
||||||
|
userGreeting.setText("Welcome " + user + "!");
|
||||||
|
|
||||||
|
String response = currentUserThings.getString("response", "");
|
||||||
|
TextView prediction = findViewById(R.id.prediction);
|
||||||
|
prediction.setText(response);
|
||||||
|
vec_back.setOnClickListener(view -> {
|
||||||
|
Intent newScreen = new Intent(getApplicationContext(), LoginActivity.class);
|
||||||
|
startActivity(newScreen);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.example.myapp_1;
|
package com.example.myapp_1;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
@@ -13,10 +12,10 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import com.example.myapp_1.DB.DBOperations;
|
import com.example.myapp_1.DB.DBOperations;
|
||||||
|
|
||||||
public class LoginActivity extends AppCompatActivity {
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
SharedPreferences currentUserThings;
|
||||||
|
|
||||||
EditText username;
|
EditText username;
|
||||||
EditText password;
|
EditText password;
|
||||||
TextView forgetpassword;
|
|
||||||
Button login;
|
Button login;
|
||||||
Button signup;
|
Button signup;
|
||||||
|
|
||||||
@@ -27,40 +26,27 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_login);
|
setContentView(R.layout.activity_login);
|
||||||
|
currentUserThings = getSharedPreferences("UserData", MODE_PRIVATE);
|
||||||
username = findViewById(R.id.editTextText);
|
username = findViewById(R.id.editTextText);
|
||||||
password = findViewById(R.id.editTextTextPassword);
|
password = findViewById(R.id.editTextTextPassword);
|
||||||
// forgetpassword = findViewById(R.id.forgetpass);
|
|
||||||
login = findViewById(R.id.button);
|
login = findViewById(R.id.loginButton);
|
||||||
signup = findViewById(R.id.button2);
|
signup = findViewById(R.id.signupButton);
|
||||||
guestLogin= findViewById(R.id.button3);
|
guestLogin= findViewById(R.id.guestButton);
|
||||||
// forgetpassword.setOnClickListener(new View.OnClickListener() {
|
|
||||||
// @Override
|
SharedPreferences.Editor editor = currentUserThings.edit();
|
||||||
// public void onClick(View v) {
|
signup.setOnClickListener(v -> {
|
||||||
// Intent newScreen = new Intent(getApplicationContext(), PasswordResetActivity.class);
|
|
||||||
// startActivity(newScreen);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
signup.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
Intent newScreen = new Intent(getApplicationContext(), SigninActivity.class);
|
Intent newScreen = new Intent(getApplicationContext(), SigninActivity.class);
|
||||||
startActivity(newScreen);
|
startActivity(newScreen);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
guestLogin.setOnClickListener(new View.OnClickListener(){
|
guestLogin.setOnClickListener(v -> {
|
||||||
|
editor.putString("username", "Guest");
|
||||||
|
editor.apply();
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
||||||
startActivity(newScreen);
|
startActivity(newScreen);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
login.setOnClickListener(new View.OnClickListener() {
|
login.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
|
|
||||||
String username_data = username.getText().toString();
|
String username_data = username.getText().toString();
|
||||||
String password_data = password.getText().toString();
|
String password_data = password.getText().toString();
|
||||||
@@ -72,6 +58,8 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
// Login successful
|
// Login successful
|
||||||
// Proceed to the next screen or perform other actions
|
// Proceed to the next screen or perform other actions
|
||||||
Toast.makeText(LoginActivity.this,"Welcome", Toast.LENGTH_LONG).show();
|
Toast.makeText(LoginActivity.this,"Welcome", Toast.LENGTH_LONG).show();
|
||||||
|
editor.putString("username", username_data);
|
||||||
|
editor.apply();
|
||||||
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
||||||
startActivity(newScreen);
|
startActivity(newScreen);
|
||||||
|
|
||||||
@@ -84,7 +72,6 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
package com.example.myapp_1;
|
package com.example.myapp_1;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
public class NotificationActivity extends AppCompatActivity {
|
public class NotificationActivity extends AppCompatActivity {
|
||||||
|
ImageView vec_back;
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_notification);
|
setContentView(R.layout.activity_notification);
|
||||||
|
vec_back = findViewById(R.id.notificationBackButton);
|
||||||
|
vec_back.setOnClickListener(view -> {
|
||||||
|
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
||||||
|
startActivity(newScreen);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class PasswordResetActivity extends AppCompatActivity {
|
|||||||
setContentView(R.layout.activity_password_reset);
|
setContentView(R.layout.activity_password_reset);
|
||||||
|
|
||||||
email = findViewById(R.id.editTextTextEmailAddress);
|
email = findViewById(R.id.editTextTextEmailAddress);
|
||||||
reset = findViewById(R.id.button3);
|
reset = findViewById(R.id.guestButton);
|
||||||
|
|
||||||
|
|
||||||
reset.setOnClickListener(new View.OnClickListener() {
|
reset.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|||||||
@@ -33,25 +33,21 @@ public class Predict extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_predict);
|
setContentView(R.layout.activity_predict);
|
||||||
|
|
||||||
vec_back = findViewById(R.id.imageView2);
|
vec_back = findViewById(R.id.predictBackButton);
|
||||||
edi_station = findViewById(R.id.editTextText);
|
edi_station = findViewById(R.id.editTextText);
|
||||||
edi_weather = findViewById(R.id.editTextText2);
|
edi_weather = findViewById(R.id.editTextText2);
|
||||||
btn_pred = findViewById(R.id.button4);
|
btn_pred = findViewById(R.id.button4);
|
||||||
prog_bar = findViewById(R.id.progressBar);
|
prog_bar = findViewById(R.id.progressBar);
|
||||||
txt_station = findViewById(R.id.textView4);
|
txt_station = findViewById(R.id.prediction);
|
||||||
txt_pred_time = findViewById(R.id.predicted_time);
|
txt_pred_time = findViewById(R.id.predicted_time);
|
||||||
|
|
||||||
vec_back.setOnClickListener(new View.OnClickListener() {
|
vec_back = findViewById(R.id.predictBackButton);
|
||||||
@Override
|
vec_back.setOnClickListener(view -> {
|
||||||
public void onClick(View view) {
|
|
||||||
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
||||||
startActivity(newScreen);
|
startActivity(newScreen);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
btn_pred.setOnClickListener(new View.OnClickListener() {
|
btn_pred.setOnClickListener(view -> {
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
String station = edi_station.getText().toString();
|
String station = edi_station.getText().toString();
|
||||||
String weather = edi_weather.getText().toString();
|
String weather = edi_weather.getText().toString();
|
||||||
|
|
||||||
@@ -79,10 +75,11 @@ public class Predict extends AppCompatActivity {
|
|||||||
txt_pred_time.setText(sdf.format(new Date(currentTimeMillis)));
|
txt_pred_time.setText(sdf.format(new Date(currentTimeMillis)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Intent apiService = new Intent(this, FetchArrival.class);
|
||||||
|
startService(apiService);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,21 @@ package com.example.myapp_1;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
public class Schedule extends AppCompatActivity {
|
public class Schedule extends AppCompatActivity {
|
||||||
|
|
||||||
|
ImageView vec_back;
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_schedule);
|
setContentView(R.layout.activity_schedule);
|
||||||
|
vec_back = findViewById(R.id.ScheduleBackButton);
|
||||||
|
vec_back.setOnClickListener(view -> {
|
||||||
|
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
|
||||||
|
startActivity(newScreen);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,19 +29,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<ImageView
|
||||||
android:id="@+id/homeToolbar"
|
android:id="@+id/homeBackButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="46dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:background="@color/material_dynamic_primary60"
|
android:layout_marginStart="16dp"
|
||||||
android:minHeight="?attr/actionBarSize"
|
android:layout_marginTop="16dp"
|
||||||
android:theme="?attr/actionBarTheme"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navigationIcon="@drawable/baseline_arrow_back_ios"
|
app:srcCompat="@drawable/_vector" />
|
||||||
app:title="Home"
|
|
||||||
app:titleCentered="true" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/userGreeting"
|
android:id="@+id/userGreeting"
|
||||||
@@ -59,7 +55,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/train_image" />
|
app:layout_constraintTop_toBottomOf="@+id/train_image" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView4"
|
android:id="@+id/prediction"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
android:inputType="textPassword" />
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button"
|
android:id="@+id/loginButton"
|
||||||
style="@android:style/Widget.Material.Button.Inset"
|
style="@android:style/Widget.Material.Button.Inset"
|
||||||
android:layout_width="311dp"
|
android:layout_width="311dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button3"
|
android:id="@+id/guestButton"
|
||||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
android:text="Guest Login" />
|
android:text="Guest Login" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button2"
|
android:id="@+id/signupButton"
|
||||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
|
|||||||
@@ -5,40 +5,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
|
||||||
android:id="@+id/notifBottomView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/material_dynamic_primary60"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:menu="@menu/botton_menu" />
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
<androidx.appcompat.widget.Toolbar
|
android:id="@+id/notificationBackButton"
|
||||||
android:id="@+id/toolbar3"
|
android:layout_width="42dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginStart="16dp"
|
||||||
android:background="@color/material_dynamic_primary60"
|
android:layout_marginTop="72dp"
|
||||||
android:minHeight="?attr/actionBarSize"
|
|
||||||
android:theme="?attr/actionBarTheme"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navigationIcon="@drawable/baseline_arrow_back_ios"
|
app:srcCompat="@drawable/_vector" />
|
||||||
app:title="Notification"
|
|
||||||
app:titleCentered="true" />
|
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:layout_width="409dp"
|
android:layout_width="409dp"
|
||||||
android:layout_height="471dp"
|
android:layout_height="471dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/notifBottomView"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/toolbar3"
|
tools:layout_editor_absoluteY="188dp" />
|
||||||
app:layout_constraintVertical_bias="0.0" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextMultiLine" />
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextMultiLine" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button3"
|
android:id="@+id/guestButton"
|
||||||
android:layout_width="184dp"
|
android:layout_width="184dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
tools:context=".Predict">
|
tools:context=".Predict">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView2"
|
android:id="@+id/predictBackButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="25dp"
|
android:layout_marginStart="25dp"
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/userGreeting" />
|
app:layout_constraintTop_toBottomOf="@+id/userGreeting" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView4"
|
android:id="@+id/prediction"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="48dp"
|
android:layout_marginTop="48dp"
|
||||||
|
|||||||
@@ -6,33 +6,27 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".Schedule">
|
tools:context=".Schedule">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<ImageView
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/ScheduleBackButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="55dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:background="@color/material_dynamic_primary60"
|
android:layout_marginStart="4dp"
|
||||||
android:minHeight="?attr/actionBarSize"
|
android:layout_marginTop="24dp"
|
||||||
android:theme="?attr/actionBarTheme"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navigationIcon="@drawable/baseline_arrow_back_ios"
|
app:srcCompat="@drawable/_vector" />
|
||||||
app:title="Schedule"
|
|
||||||
app:titleCentered="true" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView8"
|
android:id="@+id/textView8"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="40dp"
|
android:layout_marginStart="40dp"
|
||||||
android:layout_marginTop="36dp"
|
|
||||||
android:text="Start Startion:"
|
android:text="Start Startion:"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="20dp"
|
android:textSize="20dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/toolbar" />
|
tools:layout_editor_absoluteY="92dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView9"
|
android:id="@+id/textView9"
|
||||||
@@ -167,13 +161,12 @@
|
|||||||
android:id="@+id/button7"
|
android:id="@+id/button7"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="44dp"
|
||||||
android:text="Search Tram"
|
android:text="Search Tram"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.498"
|
app:layout_constraintHorizontal_bias="0.486"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
app:layout_constraintTop_toBottomOf="@+id/toolbar"
|
|
||||||
app:layout_constraintVertical_bias="0.931" />
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
app:titleCentered="true" />
|
app:titleCentered="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView2"
|
android:id="@+id/predictBackButton"
|
||||||
android:layout_width="159dp"
|
android:layout_width="159dp"
|
||||||
android:layout_height="104dp"
|
android:layout_height="104dp"
|
||||||
android:layout_marginTop="100dp"
|
android:layout_marginTop="100dp"
|
||||||
@@ -50,10 +50,10 @@
|
|||||||
android:drawablePadding="16dp"
|
android:drawablePadding="16dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/imageView2"
|
app:layout_constraintEnd_toEndOf="@+id/predictBackButton"
|
||||||
app:layout_constraintHorizontal_bias="0.483"
|
app:layout_constraintHorizontal_bias="0.483"
|
||||||
app:layout_constraintStart_toStartOf="@+id/imageView2"
|
app:layout_constraintStart_toStartOf="@+id/predictBackButton"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
app:layout_constraintTop_toBottomOf="@+id/predictBackButton" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editTextText3"
|
android:id="@+id/editTextText3"
|
||||||
|
|||||||
Reference in New Issue
Block a user