Added files of Alex and fixed the code.
|
@ -1,27 +1,27 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.example.capstone", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
package com.example.capstone;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.example.capstone", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.capstone">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".homepage"></activity>
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.capstone">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".add"></activity>
|
||||
<activity android:name=".About" />
|
||||
<activity android:name=".Support" />
|
||||
<activity android:name=".Password" />
|
||||
<activity android:name=".Enrollment" />
|
||||
<activity android:name=".Drivers" />
|
||||
<activity android:name=".Settings" />
|
||||
<activity android:name=".signup" />
|
||||
<activity android:name=".Login" />
|
||||
<activity android:name=".homepage" />
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
25
UI/app/src/main/java/com/example/capstone/About.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class About extends AppCompatActivity {
|
||||
FirebaseAuth fAuth;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_about);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
132
UI/app/src/main/java/com/example/capstone/Drivers.java
Normal file
|
@ -0,0 +1,132 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.firestore.DocumentReference;
|
||||
import com.google.firebase.firestore.DocumentSnapshot;
|
||||
import com.google.firebase.firestore.EventListener;
|
||||
import com.google.firebase.firestore.FieldValue;
|
||||
import com.google.firebase.firestore.FirebaseFirestore;
|
||||
import com.google.firebase.firestore.FirebaseFirestoreException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Drivers extends AppCompatActivity{
|
||||
FirebaseAuth fAuth;
|
||||
FirebaseFirestore fstore;
|
||||
String userID;
|
||||
private RecyclerView mRecyclerView;
|
||||
private eAdapter mAdapter;
|
||||
private RecyclerView.LayoutManager mLayoutManager;
|
||||
ArrayList<driveritem> mExampleList = new ArrayList<>();
|
||||
private Button add, remove;
|
||||
String Fname, email, phone;
|
||||
int numOfDrivers;
|
||||
int removeP;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_drivers);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
fstore = FirebaseFirestore.getInstance();
|
||||
add = findViewById(R.id.adddriver);
|
||||
remove = findViewById(R.id.removedriver);
|
||||
|
||||
userID = fAuth.getCurrentUser().getUid();
|
||||
|
||||
DocumentReference documentReference = fstore.collection("users").document(userID);
|
||||
|
||||
documentReference.addSnapshotListener(this, new EventListener<DocumentSnapshot>() {
|
||||
@Override
|
||||
public void onEvent(@Nullable DocumentSnapshot value, @Nullable FirebaseFirestoreException error) {
|
||||
|
||||
String test = value.getString("Number of Drivers");
|
||||
numOfDrivers = Integer.parseInt(test);
|
||||
|
||||
Fname = value.getString("First Name") + " " + value.getString("Last Name");
|
||||
email = value.getString("Email");
|
||||
phone = value.getString("Phone Number");
|
||||
mExampleList.add(new driveritem(Fname, email, phone));
|
||||
|
||||
for(int i=1; i<numOfDrivers; i++){
|
||||
Fname = value.getString("First Name"+(i+1)) + " " + value.getString("Last Name"+(i+1));
|
||||
email = value.getString("Email"+(i+1));
|
||||
phone = value.getString("Phone Number"+(i+1));
|
||||
mExampleList.add(new driveritem(Fname, email, phone));
|
||||
}
|
||||
|
||||
mRecyclerView = findViewById(R.id.recyclerview);
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mLayoutManager = new LinearLayoutManager(Drivers.this);
|
||||
mAdapter = new eAdapter(mExampleList);
|
||||
mRecyclerView.setLayoutManager(mLayoutManager);
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
mAdapter.setOnItemClickListener(new eAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(int position) {
|
||||
removeP = position;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
addDriver();
|
||||
}
|
||||
});
|
||||
|
||||
remove.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
removeDriver();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void addDriver(){
|
||||
startActivity(new Intent(getApplicationContext(), add.class));
|
||||
}
|
||||
|
||||
public void removeDriver(){
|
||||
if(removeP != 0){
|
||||
Map<String,Object> user = new HashMap<>();
|
||||
DocumentReference documentReference = fstore.collection("users").document(userID);
|
||||
documentReference.update("First Name"+String.valueOf(removeP+1), FieldValue.delete());
|
||||
documentReference.update("Last Name"+String.valueOf(removeP+1), FieldValue.delete());
|
||||
documentReference.update("Email"+String.valueOf(removeP+1), FieldValue.delete());
|
||||
documentReference.update("Phone Number"+String.valueOf(removeP+1), FieldValue.delete());
|
||||
user.put("Number of Drivers",String.valueOf(removeP));
|
||||
documentReference.update(user);
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
} else {
|
||||
Toast.makeText(Drivers.this, "Cannot delete main driver", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
128
UI/app/src/main/java/com/example/capstone/Enrollment.java
Normal file
|
@ -0,0 +1,128 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.tasks.OnFailureListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
import com.google.firebase.storage.UploadTask;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Enrollment extends AppCompatActivity {
|
||||
private static final int CAMERA_REQUEST = 10;
|
||||
private static final int IMAGE_GALLERY_REQUEST = 20;
|
||||
FirebaseAuth fAuth;
|
||||
FirebaseStorage storage;
|
||||
StorageReference storageReference;
|
||||
ImageView preview;
|
||||
Button upload;
|
||||
Uri imageUri;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_enrollment);
|
||||
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
storage = FirebaseStorage.getInstance();
|
||||
storageReference = storage.getReference();
|
||||
preview = findViewById(R.id.imagepreview);
|
||||
upload = findViewById(R.id.upload);
|
||||
|
||||
upload.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
StorageReference riversRef = storageReference.child("Images/"+fAuth.getCurrentUser().getUid()+"/"+ imageUri.getLastPathSegment());
|
||||
|
||||
riversRef.putFile(imageUri)
|
||||
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
|
||||
@Override
|
||||
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
|
||||
|
||||
}
|
||||
})
|
||||
.addOnFailureListener(new OnFailureListener() {
|
||||
@Override
|
||||
public void onFailure(@NonNull Exception exception) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (requestCode == CAMERA_REQUEST) {
|
||||
Bitmap cameraImage = (Bitmap) data.getExtras().get("data");
|
||||
preview.setImageBitmap(cameraImage);
|
||||
}
|
||||
if (requestCode == IMAGE_GALLERY_REQUEST) {
|
||||
imageUri = data.getData();
|
||||
InputStream inputStream;
|
||||
|
||||
try {
|
||||
inputStream = getContentResolver().openInputStream(imageUri);
|
||||
Bitmap image = BitmapFactory.decodeStream(inputStream);
|
||||
preview.setImageBitmap(image);
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(this, "Unable to open image", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void takepic(View v) {
|
||||
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
startActivityForResult(cameraIntent, CAMERA_REQUEST);
|
||||
}
|
||||
|
||||
public void loadpic(View v){
|
||||
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
|
||||
|
||||
File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
|
||||
String pictureDirectoryPath = pictureDirectory.getPath();
|
||||
Uri data = Uri.parse(pictureDirectoryPath);
|
||||
photoPickerIntent.setDataAndType(data, "image/*");
|
||||
startActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);
|
||||
|
||||
|
||||
}
|
||||
}
|
80
UI/app/src/main/java/com/example/capstone/Login.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class Login extends AppCompatActivity {
|
||||
private EditText email, password;
|
||||
private Button save;
|
||||
private TextView account;
|
||||
FirebaseAuth fAuth;
|
||||
private String em, pw;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
|
||||
email = (EditText) findViewById(R.id.username);
|
||||
password = (EditText) findViewById(R.id.password);
|
||||
save = (Button) findViewById(R.id.signin);
|
||||
account = findViewById(R.id.account);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
|
||||
account.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), signup.class));
|
||||
}
|
||||
});
|
||||
|
||||
save.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
em = email.getText().toString().trim();
|
||||
pw = password.getText().toString().trim();
|
||||
|
||||
if(TextUtils.isEmpty(em)){
|
||||
email.setError("Email is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(pw)){
|
||||
password.setError("Email is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
fAuth.signInWithEmailAndPassword(em, pw).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if(task.isSuccessful()){
|
||||
Toast.makeText(Login.this, "Successful Login", Toast.LENGTH_LONG).show();
|
||||
openHomepage();
|
||||
} else {
|
||||
Toast.makeText(Login.this, task.getException().toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openHomepage() {
|
||||
Intent intent = new Intent(this, homepage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
|
@ -1,44 +1,44 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
private Button login;
|
||||
private Button sign;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
login = (Button) findViewById(R.id.signin);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openLogin();
|
||||
}
|
||||
});
|
||||
|
||||
sign = (Button) findViewById(R.id.signup);
|
||||
sign.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openSignup();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openLogin() {
|
||||
Intent intent = new Intent(this, Login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void openSignup() {
|
||||
Intent intent2 = new Intent(this, signup.class);
|
||||
startActivity(intent2);
|
||||
}
|
||||
}
|
||||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
private Button login;
|
||||
private Button sign;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
login = (Button) findViewById(R.id.signin);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openLogin();
|
||||
}
|
||||
});
|
||||
|
||||
sign = (Button) findViewById(R.id.signup);
|
||||
sign.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openSignup();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openLogin() {
|
||||
Intent intent = new Intent(this, Login.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void openSignup() {
|
||||
Intent intent2 = new Intent(this, signup.class);
|
||||
startActivity(intent2);
|
||||
}
|
||||
}
|
||||
|
|
25
UI/app/src/main/java/com/example/capstone/Password.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class Password extends AppCompatActivity {
|
||||
FirebaseAuth fAuth;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_password);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
70
UI/app/src/main/java/com/example/capstone/Settings.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class Settings extends AppCompatActivity {
|
||||
FirebaseAuth fAuth;
|
||||
private Button dri, enr, sup, pas, abu;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_settings);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
|
||||
dri = findViewById(R.id.managedrivers);
|
||||
enr = findViewById(R.id.enrollment);
|
||||
sup = findViewById(R.id.support);
|
||||
pas = findViewById(R.id.password);
|
||||
abu = findViewById(R.id.aboutus);
|
||||
|
||||
dri.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Drivers.class));
|
||||
}
|
||||
});
|
||||
|
||||
enr.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Enrollment.class));
|
||||
}
|
||||
});
|
||||
|
||||
sup.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Support.class));
|
||||
}
|
||||
});
|
||||
|
||||
pas.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Password.class));
|
||||
}
|
||||
});
|
||||
|
||||
abu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), About.class));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
36
UI/app/src/main/java/com/example/capstone/Signal.java
Normal file
|
@ -0,0 +1,36 @@
|
|||
package com.example.capstone;
|
||||
|
||||
public class Signal {
|
||||
|
||||
private String power;
|
||||
private String alarm;
|
||||
private String motor;
|
||||
|
||||
public Signal() {
|
||||
}
|
||||
|
||||
public String getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(String power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getAlarm() {
|
||||
return alarm;
|
||||
}
|
||||
|
||||
public void setAlarm(String alarm) {
|
||||
this.alarm = alarm;
|
||||
}
|
||||
|
||||
public String getMotor() {
|
||||
return motor;
|
||||
}
|
||||
|
||||
public void setMotor(String motor) {
|
||||
this.motor = motor;
|
||||
}
|
||||
}
|
||||
|
26
UI/app/src/main/java/com/example/capstone/Support.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class Support extends AppCompatActivity {
|
||||
FirebaseAuth fAuth;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_support);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
58
UI/app/src/main/java/com/example/capstone/User.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package com.example.capstone;
|
||||
|
||||
public class User {
|
||||
|
||||
private String Firstname;
|
||||
private String Lastname;
|
||||
private Long phone;
|
||||
private String email;
|
||||
private String password;
|
||||
|
||||
public User(String fn, String ln, Long ph, String em, String pw) {
|
||||
Firstname = fn;
|
||||
Lastname = ln;
|
||||
phone = ph;
|
||||
email = em;
|
||||
password = pw;
|
||||
}
|
||||
|
||||
public String getFirstname() {
|
||||
return Firstname;
|
||||
}
|
||||
|
||||
public void setFirstname(String firstname) {
|
||||
Firstname = firstname;
|
||||
}
|
||||
|
||||
public String getLastname() {
|
||||
return Lastname;
|
||||
}
|
||||
|
||||
public void setLastname(String lastname) {
|
||||
Lastname = lastname;
|
||||
}
|
||||
|
||||
public Long getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(Long phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
155
UI/app/src/main/java/com/example/capstone/add.java
Normal file
|
@ -0,0 +1,155 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.firestore.DocumentReference;
|
||||
import com.google.firebase.firestore.DocumentSnapshot;
|
||||
import com.google.firebase.firestore.EventListener;
|
||||
import com.google.firebase.firestore.FirebaseFirestore;
|
||||
import com.google.firebase.firestore.FirebaseFirestoreException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class add extends AppCompatActivity {
|
||||
private EditText firstname, lastname, phone, email;
|
||||
private Button save, cancel;
|
||||
FirebaseAuth fAuth;
|
||||
private boolean check;
|
||||
FirebaseFirestore fstore;
|
||||
String userID;
|
||||
int numOfDrivers;
|
||||
private String fn, ln, em, ph;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add);
|
||||
|
||||
firstname = (EditText) findViewById(R.id.fname);
|
||||
lastname = (EditText) findViewById(R.id.lname);
|
||||
phone = (EditText) findViewById(R.id.phone);
|
||||
email = (EditText) findViewById(R.id.email);
|
||||
save = (Button) findViewById(R.id.adddriver);
|
||||
cancel = (Button) findViewById(R.id.cancel);
|
||||
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
fstore = FirebaseFirestore.getInstance();
|
||||
|
||||
userID = fAuth.getCurrentUser().getUid();
|
||||
|
||||
DocumentReference documentReference = fstore.collection("users").document(userID);
|
||||
|
||||
documentReference.addSnapshotListener(this, new EventListener<DocumentSnapshot>() {
|
||||
@Override
|
||||
public void onEvent(@Nullable DocumentSnapshot value, @Nullable FirebaseFirestoreException error) {
|
||||
|
||||
String test = value.getString("Number of Drivers");
|
||||
numOfDrivers = Integer.parseInt(test);
|
||||
}
|
||||
});
|
||||
|
||||
save.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
fn = firstname.getText().toString().trim();
|
||||
ln = lastname.getText().toString().trim();
|
||||
ph = phone.getText().toString().trim();
|
||||
em = email.getText().toString().trim();
|
||||
|
||||
if(TextUtils.isEmpty(fn)){
|
||||
firstname.setError("First name is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(ln)){
|
||||
lastname.setError("Last name is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(ph)){
|
||||
phone.setError("Phone number is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
check = onlyDigits(ph, ph.length());
|
||||
if(!check){
|
||||
phone.setError("Invalid phone number");
|
||||
return;
|
||||
}
|
||||
|
||||
if(ph.length() < 10){
|
||||
phone.setError("Invalid phone number");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(em)){
|
||||
email.setError("Email is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
numOfDrivers++;
|
||||
|
||||
DocumentReference documentReference = fstore.collection("users").document(userID);
|
||||
Map<String,Object> user = new HashMap<>();
|
||||
user.put("First Name"+String.valueOf(numOfDrivers),fn);
|
||||
user.put("Last Name"+String.valueOf(numOfDrivers),ln);
|
||||
user.put("Email"+String.valueOf(numOfDrivers),em);
|
||||
user.put("Phone Number"+String.valueOf(numOfDrivers),ph);
|
||||
user.put("Number of Drivers",String.valueOf(numOfDrivers));
|
||||
documentReference.update(user).addOnSuccessListener(new OnSuccessListener<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void aVoid) {
|
||||
}
|
||||
});
|
||||
openDriver();
|
||||
}
|
||||
});
|
||||
|
||||
cancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Drivers.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openDriver() {
|
||||
Intent intent = new Intent(this, Drivers.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public static boolean onlyDigits(String str, int n) {
|
||||
for(int i = 0; i < n; i++) {
|
||||
if(str.charAt(i) >= '0'
|
||||
&& str.charAt(i) <= '9') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
62
UI/app/src/main/java/com/example/capstone/addDriver.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatDialogFragment;
|
||||
|
||||
public class addDriver extends AppCompatDialogFragment {
|
||||
private EditText fn, ln, ph, em;
|
||||
private addDriverListener listener;
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
View view = inflater.inflate(R.layout.add_driver, null);
|
||||
|
||||
builder.setView(view).setTitle("Add Driver").setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
})
|
||||
.setPositiveButton("Add", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
String fns = fn.getText().toString();
|
||||
String lns = ln.getText().toString();
|
||||
String phs = ph.getText().toString();
|
||||
String ems = fn.getText().toString();
|
||||
listener.applyTexts(fns, lns, phs, ems);
|
||||
}
|
||||
});
|
||||
|
||||
fn = view.findViewById(R.id.fname);
|
||||
ln = view.findViewById(R.id.lname);
|
||||
ph = view.findViewById(R.id.phone);
|
||||
em = view.findViewById(R.id.email);
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
try {
|
||||
listener = (addDriverListener) context;
|
||||
} catch (ClassCastException e) {
|
||||
throw new ClassCastException(context.toString()+"must implement addDriverListener");
|
||||
}
|
||||
}
|
||||
|
||||
public interface addDriverListener{
|
||||
void applyTexts(String fn, String ln, String ph, String em);
|
||||
}
|
||||
}
|
24
UI/app/src/main/java/com/example/capstone/driveritem.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package com.example.capstone;
|
||||
|
||||
public class driveritem {
|
||||
|
||||
private String mText1;
|
||||
private String mText2;
|
||||
private String mText3;
|
||||
|
||||
public driveritem( String text1, String text2, String text3) {
|
||||
mText1 = text1;
|
||||
mText2 = text2;
|
||||
mText3 = text3;
|
||||
}
|
||||
|
||||
public String getText1() { return mText1; }
|
||||
|
||||
public String getText2() {
|
||||
return mText2;
|
||||
}
|
||||
|
||||
public String getText3() {
|
||||
return mText3;
|
||||
}
|
||||
}
|
81
UI/app/src/main/java/com/example/capstone/eAdapter.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
public class eAdapter extends RecyclerView.Adapter<eAdapter.ExampleViewHolder> {
|
||||
|
||||
private ArrayList<driveritem> mExampleList;
|
||||
private OnItemClickListener mListener;
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(int position);
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
public static class ExampleViewHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTextView1;
|
||||
public TextView mTextView2;
|
||||
public TextView mTextView3;
|
||||
|
||||
public ExampleViewHolder(View itemView, final OnItemClickListener listener) {
|
||||
super(itemView);
|
||||
mTextView1 = itemView.findViewById(R.id.textView);
|
||||
mTextView2 = itemView.findViewById(R.id.textView2);
|
||||
mTextView3 = itemView.findViewById(R.id.textView3);
|
||||
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (listener != null) {
|
||||
int position = getAdapterPosition();
|
||||
if (position != RecyclerView.NO_POSITION) {
|
||||
listener.onItemClick(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public eAdapter(ArrayList<driveritem> exampleList) {
|
||||
mExampleList = exampleList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExampleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.driveritem, parent, false);
|
||||
ExampleViewHolder evh = new ExampleViewHolder(v, mListener);
|
||||
return evh;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ExampleViewHolder holder, int position) {
|
||||
driveritem currentItem = mExampleList.get(position);
|
||||
|
||||
holder.mTextView1.setText(currentItem.getText1());
|
||||
holder.mTextView2.setText(currentItem.getText2());
|
||||
holder.mTextView3.setText(currentItem.getText3());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mExampleList.size();
|
||||
}
|
||||
|
||||
public void filterList(ArrayList<driveritem> filteredList) {
|
||||
mExampleList = filteredList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +1,108 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class homepage extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_homepage);
|
||||
}
|
||||
}
|
||||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.Toolbar;
|
||||
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class homepage extends AppCompatActivity {
|
||||
FirebaseAuth fAuth;
|
||||
private Button setting, poweron, alarmoff;
|
||||
DatabaseReference reff;
|
||||
Signal sig;
|
||||
int check = 0;
|
||||
int check2 = 0;
|
||||
private ImageView a, e;
|
||||
private TextView at, et;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_homepage);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
setting = findViewById(R.id.settings);
|
||||
poweron = findViewById(R.id.poweron);
|
||||
alarmoff = findViewById(R.id.alarmoff);
|
||||
at = findViewById(R.id.alarmtitle3);
|
||||
a = findViewById(R.id.alarm);
|
||||
et = findViewById(R.id.enginetitle3);
|
||||
e = findViewById(R.id.engine);
|
||||
|
||||
reff = FirebaseDatabase.getInstance().getReference().child("signal");
|
||||
sig = new Signal();
|
||||
sig.setMotor("off");
|
||||
sig.setPower("off");
|
||||
sig.setAlarm("off");
|
||||
reff.child("1").setValue(sig);
|
||||
|
||||
setting.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Settings.class));
|
||||
}
|
||||
});
|
||||
|
||||
poweron.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(check == 0){
|
||||
sig.setPower("on");
|
||||
sig.setMotor("on");
|
||||
e.setImageResource(R.drawable.ic_power_on);
|
||||
et.setText("ON");
|
||||
check = 1;
|
||||
} else {
|
||||
sig.setPower("off");
|
||||
sig.setMotor("off");
|
||||
e.setImageResource(R.drawable.ic_power_off);
|
||||
et.setText("OFF");
|
||||
check = 0;
|
||||
|
||||
}
|
||||
reff.child("1").setValue(sig);
|
||||
}
|
||||
});
|
||||
|
||||
alarmoff.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(check2 == 0){
|
||||
sig.setAlarm("on");
|
||||
a.setImageResource(R.drawable.ic_alarm_on);
|
||||
at.setText("ON");
|
||||
check2 = 1;
|
||||
} else {
|
||||
sig.setAlarm("off");
|
||||
a.setImageResource(R.drawable.ic_alarm_off);
|
||||
at.setText("OFF");
|
||||
check2 = 0;
|
||||
|
||||
}
|
||||
reff.child("1").setValue(sig);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void logout(View view){
|
||||
fAuth.signOut();
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
|
156
UI/app/src/main/java/com/example/capstone/signup.java
Normal file
|
@ -0,0 +1,156 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Button;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.firestore.DocumentReference;
|
||||
import com.google.firebase.firestore.FirebaseFirestore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class signup extends AppCompatActivity {
|
||||
private EditText firstname, lastname, phone, email, password;
|
||||
private Button save;
|
||||
FirebaseAuth fAuth;
|
||||
private TextView account;
|
||||
private String fn, ln, em, pw, ph;
|
||||
private boolean check;
|
||||
FirebaseFirestore fstore;
|
||||
String userID;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_signup);
|
||||
|
||||
firstname = (EditText) findViewById(R.id.Fname);
|
||||
lastname = (EditText) findViewById(R.id.Lname);
|
||||
phone = (EditText) findViewById(R.id.phone);
|
||||
email = (EditText) findViewById(R.id.username);
|
||||
password = (EditText) findViewById(R.id.password);
|
||||
save = (Button) findViewById(R.id.siup);
|
||||
fAuth = FirebaseAuth.getInstance();
|
||||
account = findViewById(R.id.account1);
|
||||
fstore = FirebaseFirestore.getInstance();
|
||||
account.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), Login.class));
|
||||
}
|
||||
});
|
||||
|
||||
save.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
fn = firstname.getText().toString().trim();
|
||||
ln = lastname.getText().toString().trim();
|
||||
ph = phone.getText().toString().trim();
|
||||
em = email.getText().toString().trim();
|
||||
pw = password.getText().toString().trim();
|
||||
|
||||
if(TextUtils.isEmpty(fn)){
|
||||
firstname.setError("First name is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(ln)){
|
||||
lastname.setError("Last name is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(ph)){
|
||||
phone.setError("Phone number is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
check = onlyDigits(ph, ph.length());
|
||||
if(!check){
|
||||
phone.setError("Invalid phone number");
|
||||
return;
|
||||
}
|
||||
|
||||
if(ph.length() < 10){
|
||||
phone.setError("Invalid phone number");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(em)){
|
||||
email.setError("Email is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(pw)){
|
||||
password.setError("Password is Required.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(pw.length() < 6){
|
||||
password.setError("Password must be more than 6 characters.");
|
||||
return;
|
||||
}
|
||||
|
||||
fAuth.createUserWithEmailAndPassword(em, pw).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if(task.isSuccessful()){
|
||||
Toast.makeText(signup.this, "Successful Registration", Toast.LENGTH_LONG).show();
|
||||
userID = fAuth.getCurrentUser().getUid();
|
||||
DocumentReference documentReference = fstore.collection("users").document(userID);
|
||||
Map<String,Object> user = new HashMap<>();
|
||||
user.put("First Name",fn);
|
||||
user.put("Last Name",ln);
|
||||
user.put("Email",em);
|
||||
user.put("Phone Number",ph);
|
||||
user.put("Number of Drivers",String.valueOf(1));
|
||||
documentReference.set(user).addOnSuccessListener(new OnSuccessListener<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void aVoid) {
|
||||
}
|
||||
});
|
||||
openHomepage();
|
||||
} else {
|
||||
Toast.makeText(signup.this, task.getException().toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openHomepage() {
|
||||
Intent intent = new Intent(this, homepage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public static boolean onlyDigits(String str, int n) {
|
||||
for(int i = 0; i < n; i++) {
|
||||
if(str.charAt(i) >= '0'
|
||||
&& str.charAt(i) <= '9') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
116
UI/app/src/main/res/drawable-v24/.idea/codeStyles/Project.xml
generated
Normal file
|
@ -0,0 +1,116 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
8
UI/app/src/main/res/drawable-v24/.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/drawable-v24.iml" filepath="$PROJECT_DIR$/.idea/drawable-v24.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
75
UI/app/src/main/res/drawable-v24/.idea/workspace.xml
generated
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="92bc3e5e-4d70-4751-b749-dd022bcd2b8e" name="Default Changelist" comment="" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="953" />
|
||||
<option name="width" value="974" />
|
||||
<option name="height" value="1047" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane" />
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="android.sdk.path" value="$USER_HOME$/AppData/Local/Android/Sdk" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../../../../QuizGame2" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="92bc3e5e-4d70-4751-b749-dd022bcd2b8e" name="Default Changelist" comment="" />
|
||||
<created>1603929238906</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1603929238906</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
|
||||
<layout>
|
||||
<window_info active="true" content_ui="combo" id="Project" visible="true" weight="0.32982087" />
|
||||
<window_info id="Structure" side_tool="true" />
|
||||
<window_info id="Image Layers" />
|
||||
<window_info id="Designer" />
|
||||
<window_info id="Resources Explorer" />
|
||||
<window_info id="Capture Tool" />
|
||||
<window_info id="Favorites" side_tool="true" />
|
||||
<window_info id="Captures" order="0" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Version Control" />
|
||||
<window_info anchor="bottom" id="TODO" />
|
||||
<window_info anchor="bottom" id="Terminal" />
|
||||
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||
<window_info anchor="right" id="Capture Analysis" />
|
||||
<window_info anchor="right" id="Theme Preview" />
|
||||
<window_info anchor="right" id="Palette	" />
|
||||
</layout>
|
||||
</component>
|
||||
</project>
|
BIN
UI/app/src/main/res/drawable-v24/car2.png
Normal file
After Width: | Height: | Size: 52 KiB |
|
@ -1,34 +1,34 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
|
|
BIN
UI/app/src/main/res/drawable-v24/image1.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
UI/app/src/main/res/drawable-v24/image2.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/app/src/main/res/drawable-v24/image3.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
UI/app/src/main/res/drawable-v24/image4.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
UI/app/src/main/res/drawable-v24/image5.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
UI/app/src/main/res/drawable-v24/image6.png
Normal file
After Width: | Height: | Size: 447 B |
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#000000"/>
|
||||
<!--corners allow us to make the rounded corners button-->
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ffffff"/>
|
||||
<!--corners allow us to make the rounded corners button-->
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#1D3790"
|
||||
android:endColor="#23252B"
|
||||
android:angle="270"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#1D3790"
|
||||
android:endColor="#23252B"
|
||||
android:angle="270"/>
|
||||
</shape>
|
5
UI/app/src/main/res/drawable/ic_alarm_off.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v2.21l2.45,2.45c0.03,-0.2 0.05,-0.41 0.05,-0.63zM19,12c0,0.94 -0.2,1.82 -0.54,2.64l1.51,1.51C20.63,14.91 21,13.5 21,12c0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM4.27,3L3,4.27 7.73,9L3,9v6h4l5,5v-6.73l4.25,4.25c-0.67,0.52 -1.42,0.93 -2.25,1.18v2.06c1.38,-0.31 2.63,-0.95 3.69,-1.81L19.73,21 21,19.73l-9,-9L4.27,3zM12,4L9.91,6.09 12,8.18L12,4z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_alarm_on.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FF0003"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_apps.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M4,8h4L8,4L4,4v4zM10,20h4v-4h-4v4zM4,20h4v-4L4,16v4zM4,14h4v-4L4,10v4zM10,14h4v-4h-4v4zM16,4v4h4L20,4h-4zM10,8h4L14,4h-4v4zM16,14h4v-4h-4v4zM16,20h4v-4h-4v4z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_email.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
|
||||
</vector>
|
|
@ -1,170 +1,170 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
|
|
5
UI/app/src/main/res/drawable/ic_lock.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_lock_close.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2L8.9,8L8.9,6zM18,20L6,20L6,10h12v10z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_lock_open.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FF0003"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_person.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,5.9c1.16,0 2.1,0.94 2.1,2.1s-0.94,2.1 -2.1,2.1S9.9,9.16 9.9,8s0.94,-2.1 2.1,-2.1m0,9c2.97,0 6.1,1.46 6.1,2.1v1.1L5.9,18.1L5.9,17c0,-0.64 3.13,-2.1 6.1,-2.1M12,4C9.79,4 8,5.79 8,8s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,13c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_phone.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_power_off.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_power_on.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FF0003"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
|
||||
</vector>
|
5
UI/app/src/main/res/drawable/ic_settings.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z"/>
|
||||
</vector>
|
19
UI/app/src/main/res/drawable/loginedittext.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_enabled="true" android:state_focused="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#cad4e3"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<stroke android:color="#cad4e3" android:width="1dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:state_enabled="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="10dp"/>
|
||||
<stroke android:color="#cad4e3" android:width="1dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
6
UI/app/src/main/res/drawable/outlinebutton.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="10dp" />
|
||||
<stroke android:width="5px" android:color="#ffffff" />
|
||||
</shape>
|
27
UI/app/src/main/res/layout/activity_about.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".About">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ebouttitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="About us"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
118
UI/app/src/main/res/layout/activity_add.xml
Normal file
|
@ -0,0 +1,118 @@
|
|||
<?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=".add"
|
||||
android:background="@drawable/background"
|
||||
>
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/adddrivertitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Add Driver"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/fname"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:hint="First Name"
|
||||
android:paddingLeft="10dp"
|
||||
android:textColorHint="#ffffff"
|
||||
tools:layout_editor_absoluteX="25dp"
|
||||
tools:layout_editor_absoluteY="145dp"
|
||||
android:layout_marginBottom="540dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/lname"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:hint="Last Name"
|
||||
android:paddingLeft="10dp"
|
||||
android:textColorHint="#ffffff"
|
||||
tools:layout_editor_absoluteX="25dp"
|
||||
tools:layout_editor_absoluteY="208dp"
|
||||
android:layout_marginBottom="470dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:hint="Phone Number"
|
||||
android:paddingLeft="10dp"
|
||||
android:textColorHint="#ffffff"
|
||||
tools:layout_editor_absoluteX="25dp"
|
||||
tools:layout_editor_absoluteY="267dp"
|
||||
android:layout_marginBottom="400dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:hint="Email"
|
||||
android:paddingLeft="10dp"
|
||||
android:textColorHint="#ffffff"
|
||||
tools:layout_editor_absoluteX="25dp"
|
||||
tools:layout_editor_absoluteY="332dp"
|
||||
android:layout_marginBottom="330dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/adddriver"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Add Driver"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Cancel"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
64
UI/app/src/main/res/layout/activity_drivers.xml
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".Drivers">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/driverstitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Manage Drivers"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="430dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="180dp"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/adddriver"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Add Driver"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/removedriver"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Remove Driver"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
79
UI/app/src/main/res/layout/activity_enrollment.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".Enrollment">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enrollmenttitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Enrollment"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imagepreview"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="350dp"
|
||||
android:layout_marginBottom="240dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/common_google_signin_btn_icon_disabled" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/load"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginBottom="140dp"
|
||||
android:text="Load picture"
|
||||
android:onClick="loadpic"
|
||||
android:background="@drawable/mybutton"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textColor="#1D3790"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/takepicture"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginBottom="140dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:onClick="takepic"
|
||||
android:text="Take picture"
|
||||
android:textColor="#1D3790"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/upload"
|
||||
android:layout_width="290dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:onClick="takepic"
|
||||
android:text="upload"
|
||||
android:textColor="#1D3790"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,84 +1,468 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".homepage">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="My Smart
|
||||
Car"
|
||||
android:textColor="#000000"
|
||||
android:textSize="55dp"
|
||||
android:textStyle="bold"
|
||||
app:fontFamily="casual"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.115" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/but1"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Manage Users"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/but2"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="180dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Add Users"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/but3"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="260dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Live feed"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/but4"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="340dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Anti-Theft"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".homepage">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/alarmB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginBottom="565dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/image1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/DDB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginBottom="460dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/image2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/DBB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginBottom="385dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/image2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/TrunkB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginBottom="280dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/image4" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/engineB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="565dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/image3" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/PDB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="460dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/image5" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/PBB"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="94dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="385dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/image5" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/alarm"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="588dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_alarm_off" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/DD"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="482dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/DB"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="408dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Trunk"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="302dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/engine"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginRight="70dp"
|
||||
android:layout_marginBottom="588dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_power_off" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/PD"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginRight="70dp"
|
||||
android:layout_marginBottom="482dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/PB"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginRight="70dp"
|
||||
android:layout_marginBottom="408dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/car"
|
||||
android:layout_width="370dp"
|
||||
android:layout_height="340dp"
|
||||
android:layout_marginBottom="320dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/car2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/enginetitle2"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="190dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_power_off" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enginetitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="189dp"
|
||||
android:gravity="center"
|
||||
android:text="Engine"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/doorstitle2"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="160dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Doorstittle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="159dp"
|
||||
android:gravity="center"
|
||||
android:text="Doors"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/trunktitle2"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="130dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_lock_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trunktitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="128dp"
|
||||
android:gravity="center"
|
||||
android:text="Trunk"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/alarmtitle2"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_alarm_off" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alarmtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="70dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:gravity="center"
|
||||
android:text="Alarm"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/image6" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_x="118dp"
|
||||
android:layout_y="95dp"
|
||||
android:background="@drawable/ic_settings"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/poweron"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_x="118dp"
|
||||
android:layout_y="95dp"
|
||||
android:background="@drawable/ic_power_off"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/alarmoff"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_x="118dp"
|
||||
android:layout_y="95dp"
|
||||
android:background="@drawable/ic_alarm_off"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/poweron" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/apps"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_x="118dp"
|
||||
android:layout_y="95dp"
|
||||
android:background="@drawable/ic_apps"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/alarmoff" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enginetitle3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="189dp"
|
||||
android:gravity="center"
|
||||
android:text="OFF"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Doorstitle3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="159dp"
|
||||
android:gravity="center"
|
||||
android:text="LOCKED"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trunktitle3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="128dp"
|
||||
android:gravity="center"
|
||||
android:text="LOCKED"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alarmtitle3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:gravity="center"
|
||||
android:text="OFF"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingstitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="317dp"
|
||||
android:layout_marginLeft="317dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="Settings"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="15dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/powertitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="206dp"
|
||||
android:layout_marginLeft="206dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="Engine on/off"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="15dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alarmtitle4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="111dp"
|
||||
android:layout_marginLeft="111dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="Alarm on/off"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="15dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/apptitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="42dp"
|
||||
android:layout_marginLeft="42dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="Apps"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="15dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
130
UI/app/src/main/res/layout/activity_login.xml
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Login">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Don't have an account? Sign up"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="13dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="235dp"
|
||||
android:layout_height="240dp"
|
||||
android:layout_marginBottom="470dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/caroutline2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="KEYLESS AUTO"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="27dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="485dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Vehicle Anti-Theft Facial Recognition System"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="9dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="470dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="300dp"
|
||||
android:gravity="center"
|
||||
android:text="Login"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:hint="Email Address"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_marginBottom="220dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:hint="Password"
|
||||
android:drawablePadding="12dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:inputType="textPassword"
|
||||
android:layout_marginBottom="150dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/signin"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign In"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,70 +1,78 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"><![CDATA[
|
||||
tools:context=".MainActivity">
|
||||
|
||||
|
||||
|
||||
]]>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="My Smart
|
||||
Car"
|
||||
android:textColor="#000000"
|
||||
android:textSize="55dp"
|
||||
android:textStyle="bold"
|
||||
app:fontFamily="casual"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.237" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/singin"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign In"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/signup"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign Up"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.501"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="329dp"
|
||||
android:layout_height="299dp"
|
||||
android:layout_marginBottom="148dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/caroutline2" />
|
||||
|
||||
<?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"
|
||||
android:background="@drawable/background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="KEYLESS AUTO"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="40dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="280dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center"
|
||||
android:text="Vehicle Anti-Theft Facial Recognition System"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="13dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="265dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/signin"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign In"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/signup"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign Up"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="420dp"
|
||||
android:layout_marginBottom="230dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/caroutline2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
27
UI/app/src/main/res/layout/activity_password.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".Password">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passwordtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Password"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
188
UI/app/src/main/res/layout/activity_settings.xml
Normal file
|
@ -0,0 +1,188 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".Settings">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingstitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Settings"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mdexplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="545dp"
|
||||
android:gravity="center"
|
||||
android:text="Add and remove drivers for this account"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enexplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="475dp"
|
||||
android:gravity="center"
|
||||
android:text="manage face recognition"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pwexplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="405dp"
|
||||
android:gravity="center"
|
||||
android:text="Change account password"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/spexplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="335dp"
|
||||
android:gravity="center"
|
||||
android:text="Report a problem"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/auexplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="265dp"
|
||||
android:gravity="center"
|
||||
android:text="Team and project description"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/managedrivers"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="530dp"
|
||||
android:background="@drawable/outlinebutton"
|
||||
android:gravity="left|center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="Manage drivers"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/enrollment"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="460dp"
|
||||
android:background="@drawable/outlinebutton"
|
||||
android:gravity="left|center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="Enrollment"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/password"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="390dp"
|
||||
android:background="@drawable/outlinebutton"
|
||||
android:gravity="left|center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="Password"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/support"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="320dp"
|
||||
android:background="@drawable/outlinebutton"
|
||||
android:gravity="left|center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="Support"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/aboutus"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="250dp"
|
||||
android:background="@drawable/outlinebutton"
|
||||
android:gravity="left|center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="About us"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
175
UI/app/src/main/res/layout/activity_signup.xml
Normal file
|
@ -0,0 +1,175 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".signup">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Already have an account? Sign in"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="13dp"
|
||||
app:fontFamily="normal"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="142dp"
|
||||
android:layout_marginBottom="540dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/caroutline2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="92dp"
|
||||
android:layout_marginRight="46dp"
|
||||
android:gravity="center"
|
||||
android:text="KEYLESS AUTO"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="25dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="130dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:gravity="center"
|
||||
android:text="Vehicle Anti-Theft Facial Recognition System"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="9dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="510dp"
|
||||
android:gravity="center"
|
||||
android:text="Register"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Fname"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_person"
|
||||
android:drawablePadding="12dp"
|
||||
android:hint="First Name"
|
||||
android:textColorHint="#ffffff"
|
||||
android:layout_marginBottom="430dp"
|
||||
android:paddingLeft="5dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Lname"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_person"
|
||||
android:drawablePadding="12dp"
|
||||
android:hint="Last Name"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:layout_marginBottom="360dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_phone"
|
||||
android:drawablePadding="12dp"
|
||||
android:hint="Phone Number"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:layout_marginBottom="290dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="12dp"
|
||||
android:hint="Email Address"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:layout_marginBottom="220dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:drawablePadding="12dp"
|
||||
android:hint="Password"
|
||||
android:inputType="textPassword"
|
||||
android:textColorHint="#ffffff"
|
||||
android:layout_marginBottom="150dp"
|
||||
android:paddingLeft="5dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/siup"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:text="Sign up"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
27
UI/app/src/main/res/layout/activity_support.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?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"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".Support">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/supporttitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="630dp"
|
||||
android:gravity="center"
|
||||
android:text="Support"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="30dp"
|
||||
app:fontFamily="normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
49
UI/app/src/main/res/layout/add_driver.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent" android:layout_height="match_parent"
|
||||
android:padding="16dp"
|
||||
android:background="@drawable/background">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/fname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:textColorHint="#ffffff"
|
||||
android:hint="First Name"
|
||||
android:paddingLeft="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/lname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:textColorHint="#ffffff"
|
||||
android:hint="Last Name"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_marginTop="60dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="10dp"
|
||||
android:hint="Phone Number" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="180dp"
|
||||
android:background="@drawable/loginedittext"
|
||||
android:textColorHint="#ffffff"
|
||||
android:paddingLeft="10dp"
|
||||
android:hint="Email" />
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
54
UI/app/src/main/res/layout/driveritem.xml
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardBackgroundColor="#00123456"
|
||||
android:layout_marginRight="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="104dp"
|
||||
android:layout_margin="1dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_toEndOf="@+id/imageView"
|
||||
android:text="Line 1"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_toEndOf="@+id/imageView"
|
||||
android:textColor="#ffffff"
|
||||
android:text="Line 2"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="#ffffff"
|
||||
android:layout_toEndOf="@+id/imageView"
|
||||
android:text="Line 3"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
28
UI/app/src/main/res/layout/toolbar.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimary"
|
||||
android:elevation="4dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Keyless Auto"
|
||||
android:textSize="20dp"
|
||||
android:textColor="#ffffff"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/signout"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginStart="220dp"
|
||||
android:background="@drawable/mybutton"
|
||||
android:onClick="logout"
|
||||
android:text="Sign Out"
|
||||
android:textColor="#1D3790"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#111629</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">Capstone</string>
|
||||
</resources>
|
||||
<resources>
|
||||
<string name="app_name">Capstone</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package com.example.capstone;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
package com.example.capstone;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|