initial commit

This commit is contained in:
Alex
2026-03-02 13:43:20 -07:00
commit d1675643e5
79 changed files with 3187 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package com.example.petstoremobile;
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.petstoremobile", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.PetStoreMobile">
<activity
android:name=".activities.InventoryActivity"
android:exported="false" />
<activity
android:name=".activities.AdoptionActivity"
android:exported="false" />
<activity
android:name=".activities.SupplierActivity"
android:exported="false" />
<activity
android:name=".activities.detailactivites.SupplierDetailActivity"
android:exported="false" />
<activity
android:name=".activities.detailactivites.ServiceDetailActivity"
android:exported="false" />
<activity
android:name=".activities.detailactivites.PetDetailActivity"
android:exported="false" />
<activity
android:name=".activities.ProductActivity"
android:exported="false" />
<activity
android:name=".activities.AppointmentActivity"
android:exported="false" />
<activity
android:name=".activities.ServiceActivity"
android:exported="false" />
<activity
android:name=".activities.PetActivity"
android:exported="false" />
<activity
android:name=".activities.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,26 @@
package com.example.petstoremobile.activities;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class AdoptionActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_adoption);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
}

View File

@@ -0,0 +1,25 @@
package com.example.petstoremobile.activities;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class AppointmentActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_appointments);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
}

View File

@@ -0,0 +1,54 @@
package com.example.petstoremobile.activities;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import androidx.appcompat.app.AppCompatActivity;
import com.example.petstoremobile.R;
public class BaseActivity extends AppCompatActivity {
//Inflate the shared menu
@Override
public boolean onCreateOptionsMenu(Menu menu){
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
//Handle menu clicks
@Override
public boolean onOptionsItemSelected(MenuItem item){
if (item.getItemId() == R.id.menu_pets) {
if (!(this instanceof PetActivity)) {
startActivity(new Intent(this, PetActivity.class));
}
} else if (item.getItemId() == R.id.menu_adoption) {
if (!(this instanceof AdoptionActivity)) {
startActivity(new Intent(this, AdoptionActivity.class));
}
} else if (item.getItemId() == R.id.menu_services) {
if (!(this instanceof ServiceActivity)) {
startActivity(new Intent(this, ServiceActivity.class));
}
} else if (item.getItemId() == R.id.menu_appointments) {
if (!(this instanceof AppointmentActivity)) {
startActivity(new Intent(this, AppointmentActivity.class));
}
} else if (item.getItemId() == R.id.menu_inventory) {
if (!(this instanceof InventoryActivity)) {
startActivity(new Intent(this, InventoryActivity.class));
}
} else if (item.getItemId() == R.id.menu_products) {
if (!(this instanceof ProductActivity)) {
startActivity(new Intent(this, ProductActivity.class));
}
} else if (item.getItemId() == R.id.menu_suppliers) {
if (!(this instanceof SupplierActivity)) {
startActivity(new Intent(this, SupplierActivity.class));
}
}
return super.onOptionsItemSelected(item);
}
}

View File

@@ -0,0 +1,26 @@
package com.example.petstoremobile.activities;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class InventoryActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_inventory);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
}

View File

@@ -0,0 +1,71 @@
package com.example.petstoremobile.activities;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class MainActivity extends AppCompatActivity {
private EditText etUser;
private EditText etPassword;
private Button btnLogin;
private TextView tvLoginStatus;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
//get all controls from layout
tvLoginStatus = findViewById(R.id.tvLoginStatus);
etUser = findViewById(R.id.etUser);
etPassword = findViewById(R.id.etPassword);
btnLogin = findViewById(R.id.btnLogin);
//clear login status
tvLoginStatus.setText("");
//Set click listener for login button
btnLogin.setOnClickListener(v -> {
//Get user name and password from text fields
String username = etUser.getText().toString();
String password = etPassword.getText().toString();
//check if fields are empty
if (username.isEmpty() || password.isEmpty()) {
Toast.makeText(this, "Please enter username and password", Toast.LENGTH_SHORT).show();
tvLoginStatus.setText("Please enter username and password");
return;
}
//check if username and password are correct
if (username.equals("admin") && password.equals("admin")) {
Intent intent = new Intent(this, PetActivity.class);
startActivity(intent);
Toast.makeText(this, "Login successful", Toast.LENGTH_SHORT).show();
finish();
}
else {
Toast.makeText(this, "Login failed", Toast.LENGTH_SHORT).show();
tvLoginStatus.setText("Login failed");
}
});
}
}

View File

@@ -0,0 +1,66 @@
package com.example.petstoremobile.activities;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.PetDetailActivity;
import com.example.petstoremobile.adapters.PetAdapter;
import com.example.petstoremobile.models.Pet;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
import java.util.List;
public class PetActivity extends BaseActivity {
private List<Pet> petList = new ArrayList<>();
private PetAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_pets);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
loadPetData(); //TODO: Replace this with actual data when backend is working
setupRecyclerView();
// Add button opens the add dialog
FloatingActionButton fabAddPet = findViewById(R.id.fabAddPet);
fabAddPet.setOnClickListener(v -> {
Intent intent = new Intent(this, PetDetailActivity.class);
startActivity(intent);
});
}
// Loads hardcoded sample data for now TODO: REPLACE THIS WITH A METHOD THAT GETS DATA FROM THE DATABASE
private void loadPetData() {
petList.add(new Pet(1, "Buddy", "Dog", "Labrador", 2, "Available", 500.00));
petList.add(new Pet(2, "Milo", "Cat", "Persian", 1, "Available", 300.00));
petList.add(new Pet(3, "Charlie", "Dog", "Golden Retriever", 3, "Available", 550.00));
petList.add(new Pet(4, "Luna", "Cat", "Siamese", 2, "Adopted", 350.00));
petList.add(new Pet(5, "Max", "Dog", "Beagle", 1, "Available", 450.00));
petList.add(new Pet(6, "Bella", "Cat", "Maine Coon", 4, "Available", 400.00));
}
//set up the recyclerview and adapter
private void setupRecyclerView() {
RecyclerView recyclerView = findViewById(R.id.recyclerViewPets);
adapter = new PetAdapter(petList, this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
}

View File

@@ -0,0 +1,25 @@
package com.example.petstoremobile.activities;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class ProductActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_products);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
}

View File

@@ -0,0 +1,65 @@
package com.example.petstoremobile.activities;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.ServiceDetailActivity;
import com.example.petstoremobile.adapters.ServiceAdapter;
import com.example.petstoremobile.models.Service;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
import java.util.List;
public class ServiceActivity extends BaseActivity {
private List<Service> serviceList = new ArrayList<>();
private ServiceAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_services);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
loadServiceData();
setupRecyclerView();
// Add button opens the add dialog
FloatingActionButton fabAddService = findViewById(R.id.fabAddService);
fabAddService.setOnClickListener(v -> {
Intent intent = new Intent(this, ServiceDetailActivity.class);
startActivity(intent);
});
}
// Loads hardcoded sample data for now TODO: REPLACE THIS WITH A METHOD THAT GETS DATA FROM THE DATABASE
private void loadServiceData() {
serviceList.add(new Service(1, "Pet Grooming", "Full grooming service", 60, 40.00));
serviceList.add(new Service(2, "Nail Trimming", "Quick nail trim", 15, 10.00));
serviceList.add(new Service(3, "Bath and Brush", "Bathing and brushing service", 45, 30.00));
serviceList.add(new Service(4, "Veterinary Checkup", "Complete health examination", 30, 75.00));
serviceList.add(new Service(5, "Teeth Cleaning", "Professional dental cleaning", 90, 100.00));
}
// Set up the RecyclerView and adapter
private void setupRecyclerView() {
RecyclerView recyclerView = findViewById(R.id.recyclerViewServices);
adapter = new ServiceAdapter(serviceList, this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
}

View File

@@ -0,0 +1,68 @@
package com.example.petstoremobile.activities;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.SupplierDetailActivity;
import com.example.petstoremobile.adapters.SupplierAdapter;
import com.example.petstoremobile.models.Supplier;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
import java.util.List;
public class SupplierActivity extends BaseActivity {
private List<Supplier> supplierList = new ArrayList<>();
private SupplierAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_supplier);
if (findViewById(R.id.main) != null) {
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
loadSupplierData(); //TODO: Replace this with actual data when backend is working
setupRecyclerView();
// Add button opens the add dialog
FloatingActionButton fabAddSupplier = findViewById(R.id.fabAddSupplier);
fabAddSupplier.setOnClickListener(v -> {
Intent intent = new Intent(this, SupplierDetailActivity.class);
startActivity(intent);
});
}
// Loads hardcoded sample data for now TODO: REPLACE THIS WITH A METHOD THAT GETS DATA FROM THE DATABASE
private void loadSupplierData() {
supplierList.add(new Supplier(1, "PetCare Inc.", "John", "Doe", "john@petcare.com", "888-555-0101"));
supplierList.add(new Supplier(2, "Happy Tails", "Jane", "Smith", "jane@happytails.com", "888-555-0102"));
supplierList.add(new Supplier(3, "Animal Supplies Co.", "Mike", "Brown", "mike@animalsupplies.com", "888-555-0103"));
supplierList.add(new Supplier(4, "Groomers Choice", "Sarah", "Wilson", "sarah@groomerschoice.com", "888-555-0104"));
supplierList.add(new Supplier(5, "Healthy Pets", "Robert", "Miller", "robert@healthypets.com", "888-555-0105"));
}
// set up the recyclerview and adapter
private void setupRecyclerView() {
RecyclerView recyclerView = findViewById(R.id.recyclerViewSuppliers);
adapter = new SupplierAdapter(supplierList, this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
}

View File

@@ -0,0 +1,127 @@
package com.example.petstoremobile.activities.detailactivites;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class PetDetailActivity extends AppCompatActivity {
private TextView tvMode, tvPetId;
private EditText etPetName, etPetSpecies, etPetBreed, etPetAge, etPetPrice;
private Spinner spinnerPetStatus;
private Button btnSavePet, btnDeletePet, btnBack;
private int petId;
private boolean isEditing = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_pet_detail);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
//set up spinner and get controls from layout
initViews();
setupSpinner();
handleIntent();
btnBack.setOnClickListener(v -> finish());
btnSavePet.setOnClickListener(v -> savePet());
btnDeletePet.setOnClickListener(v -> deletePet());
}
//get controls from layout
private void initViews() {
tvMode = findViewById(R.id.tvMode);
tvPetId = findViewById(R.id.tvPetId);
etPetName = findViewById(R.id.etPetName);
etPetSpecies = findViewById(R.id.etPetSpecies);
etPetBreed = findViewById(R.id.etPetBreed);
etPetAge = findViewById(R.id.etPetAge);
etPetPrice = findViewById(R.id.etPetPrice);
spinnerPetStatus = findViewById(R.id.spinnerPetStatus);
btnSavePet = findViewById(R.id.btnSavePet);
btnDeletePet = findViewById(R.id.btnDeletePet);
btnBack = findViewById(R.id.btnBack);
}
//set up the spinner menu for pet status
private void setupSpinner() {
ArrayAdapter<String> adapter = new ArrayAdapter<>(this,
android.R.layout.simple_spinner_item,
new String[]{"Available", "Adopted"});
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerPetStatus.setAdapter(adapter);
}
//check if pet is being edited or added and show the view accordingly
private void handleIntent() {
// Pet is being edited
if (getIntent().hasExtra("petId")) {
// Get pet data from intent and populate fields
isEditing = true;
petId = getIntent().getIntExtra("petId", -1);
tvMode.setText("Edit Pet");
tvPetId.setText("ID: " + petId);
etPetName.setText(getIntent().getStringExtra("petName"));
etPetSpecies.setText(getIntent().getStringExtra("petSpecies"));
etPetBreed.setText(getIntent().getStringExtra("petBreed"));
etPetAge.setText(String.valueOf(getIntent().getIntExtra("petAge", 0)));
etPetPrice.setText(String.valueOf(getIntent().getDoubleExtra("petPrice", 0.0)));
// Set spinner selection based on pet status
String status = getIntent().getStringExtra("petStatus");
if ("Available".equals(status)) {
spinnerPetStatus.setSelection(0);
} else {
spinnerPetStatus.setSelection(1);
}
//Delete button is visible when editing
btnDeletePet.setVisibility(View.VISIBLE);
} else {
// Pet is being added
// Set default values for add a new pet
isEditing = false;
tvMode.setText("Add Pet");
tvPetId.setVisibility(View.GONE);
btnDeletePet.setVisibility(View.GONE);
btnSavePet.setText("Add");
}
}
//TODO: Method to Update or Add a pet
private void savePet() {
if (isEditing) {
// TODO: Update pet
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
} else {
// TODO: Add new pet
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
}
finish();
}
//TODO: Method to Delete a pet
private void deletePet() {
Toast.makeText(this, "Delete functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
finish();
}
}

View File

@@ -0,0 +1,104 @@
package com.example.petstoremobile.activities.detailactivites;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class ServiceDetailActivity extends AppCompatActivity {
private TextView tvMode, tvServiceId;
private EditText etServiceName, etServiceDesc, etServiceDuration, etServicePrice;
private Button btnSaveService, btnDeleteService, btnBack;
private int serviceId;
private boolean isEditing = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_service_detail);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
initViews();
handleIntent();
//Set clicks listener for each button
btnBack.setOnClickListener(v -> finish());
btnSaveService.setOnClickListener(v -> saveService());
btnDeleteService.setOnClickListener(v -> deleteService());
}
//get controls form layout
private void initViews() {
tvMode = findViewById(R.id.tvMode);
tvServiceId = findViewById(R.id.tvServiceId);
etServiceName = findViewById(R.id.etServiceName);
etServiceDesc = findViewById(R.id.etServiceDesc);
etServiceDuration = findViewById(R.id.etServiceDuration);
etServicePrice = findViewById(R.id.etServicePrice);
btnSaveService = findViewById(R.id.btnSaveService);
btnDeleteService = findViewById(R.id.btnDeleteService);
btnBack = findViewById(R.id.btnBack);
}
//check if service is being edited or added and show the view accordingly
private void handleIntent() {
// Service is being edited
if (getIntent().hasExtra("serviceId")) {
// Get service data from intent and populate fields
isEditing = true;
serviceId = getIntent().getIntExtra("serviceId", -1);
tvMode.setText("Edit Service");
tvServiceId.setText("ID: " + serviceId);
etServiceName.setText(getIntent().getStringExtra("serviceName"));
etServiceDesc.setText(getIntent().getStringExtra("serviceDesc"));
etServiceDuration.setText(String.valueOf(getIntent().getIntExtra("serviceDuration", 0)));
etServicePrice.setText(String.valueOf(getIntent().getDoubleExtra("servicePrice", 0.0)));
//Delete button is visible when editing
btnDeleteService.setVisibility(View.VISIBLE);
} else {
// Service is being added
// Set default values for add a new service
isEditing = false;
tvMode.setText("Add Service");
tvServiceId.setVisibility(View.GONE);
btnDeleteService.setVisibility(View.GONE);
btnSaveService.setText("Add");
}
}
//TODO: Method to Update or Add a service
private void saveService() {
if (isEditing) {
// TODO: Update service
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
} else {
// TODO: Add new service
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
}
finish();
}
//TODO: Method to Delete a service
private void deleteService() {
Toast.makeText(this, "Delete functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
finish();
}
}

View File

@@ -0,0 +1,104 @@
package com.example.petstoremobile.activities.detailactivites;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.petstoremobile.R;
public class SupplierDetailActivity extends AppCompatActivity {
private TextView tvMode, tvSupId;
private EditText etSupCompany, etSupContactFirstName, etSupContactLastName, etSupEmail, etSupPhone;
private Button btnSaveSupplier, btnDeleteSupplier, btnBack;
private int supId;
private boolean isEditing = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_supplier_detail);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
initViews();
handleIntent();
//Set clicks listener for each button
btnBack.setOnClickListener(v -> finish());
btnSaveSupplier.setOnClickListener(v -> saveSupplier());
btnDeleteSupplier.setOnClickListener(v -> deleteSupplier());
}
//get controls form layout
private void initViews() {
tvMode = findViewById(R.id.tvMode);
tvSupId = findViewById(R.id.tvSupId);
etSupCompany = findViewById(R.id.etSupCompany);
etSupContactFirstName = findViewById(R.id.etSupContactFirstName);
etSupContactLastName = findViewById(R.id.etSupContactLastName);
etSupEmail = findViewById(R.id.etSupEmail);
etSupPhone = findViewById(R.id.etSupPhone);
btnSaveSupplier = findViewById(R.id.btnSaveSupplier);
btnDeleteSupplier = findViewById(R.id.btnDeleteSupplier);
btnBack = findViewById(R.id.btnBack);
}
//check if supplier is being edited or added and show the view accordingly
private void handleIntent() {
// Supplier is being edited
if (getIntent().hasExtra("supId")) {
// Get supplier data from intent and populate fields
isEditing = true;
supId = getIntent().getIntExtra("supId", -1);
tvMode.setText("Edit Supplier");
tvSupId.setText("ID: " + supId);
etSupCompany.setText(getIntent().getStringExtra("supCompany"));
etSupContactFirstName.setText(getIntent().getStringExtra("supContactFirstName"));
etSupContactLastName.setText(getIntent().getStringExtra("supContactLastName"));
etSupEmail.setText(getIntent().getStringExtra("supEmail"));
etSupPhone.setText(getIntent().getStringExtra("supPhone"));
//Delete button is visible when editing
btnDeleteSupplier.setVisibility(View.VISIBLE);
} else {
// Supplier is being added
// Set default values for add a new supplier
isEditing = false;
tvMode.setText("Add Supplier");
tvSupId.setVisibility(View.GONE);
btnDeleteSupplier.setVisibility(View.GONE);
btnSaveSupplier.setText("Add");
}
}
//TODO: Method to Update or Add a supplier
private void saveSupplier() {
if (isEditing) {
// TODO: Update supplier
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
} else {
// TODO: Add new supplier
Toast.makeText(this, "Save functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
}
finish();
}
//TODO: Method to Delete a supplier
private void deleteSupplier() {
Toast.makeText(this, "Delete functionality not yet implemented with DB", Toast.LENGTH_SHORT).show();
finish();
}
}

View File

@@ -0,0 +1,86 @@
package com.example.petstoremobile.adapters;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.PetDetailActivity;
import com.example.petstoremobile.models.Pet;
import java.util.List;
public class PetAdapter extends RecyclerView.Adapter<PetAdapter.PetViewHolder> {
private List<Pet> petList;
private Context context;
//Constructor
public PetAdapter(List<Pet> petList, Context context) {
this.petList = petList;
this.context = context;
}
// Get the controls of each row in recycler view
public static class PetViewHolder extends RecyclerView.ViewHolder {
TextView tvPetName, tvPetSpeciesBreed, tvPetAge, tvPetPrice, tvPetStatus;
public PetViewHolder(@NonNull View v) {
super(v);
tvPetName = v.findViewById(R.id.tvPetName);
tvPetSpeciesBreed = v.findViewById(R.id.tvPetSpeciesBreed);
tvPetAge = v.findViewById(R.id.tvPetAge);
tvPetPrice = v.findViewById(R.id.tvPetPrice);
tvPetStatus = v.findViewById(R.id.tvPetStatus);
}
}
// Create a new row view
@NonNull
@Override
public PetViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(context).inflate(R.layout.item_pet, parent, false);
return new PetViewHolder(v);
}
//populate the row with pet data
@Override
public void onBindViewHolder(@NonNull PetViewHolder holder, int position) {
Pet pet = petList.get(position);
holder.tvPetName.setText(pet.getPetName());
holder.tvPetSpeciesBreed.setText(pet.getPetSpecies() + " - " + pet.getPetBreed());
holder.tvPetAge.setText("Age: " + pet.getPetAge() + " yr(s)");
holder.tvPetPrice.setText("$" + String.format("%.2f", pet.getPetPrice()));
holder.tvPetStatus.setText(pet.getPetStatus());
//Set the status color depending on availability. If available, green, otherwise red
if (pet.getPetStatus().equals("Available")) {
holder.tvPetStatus.setBackgroundColor(Color.parseColor("#4CAF50"));
} else {
holder.tvPetStatus.setBackgroundColor(Color.parseColor("#F44336"));
}
//Set click listener for each row
holder.itemView.setOnClickListener(v -> {
Intent intent = new Intent(context, PetDetailActivity.class);
intent.putExtra("petId", pet.getPetId());
intent.putExtra("petName", pet.getPetName());
intent.putExtra("petSpecies", pet.getPetSpecies());
intent.putExtra("petBreed", pet.getPetBreed());
intent.putExtra("petAge", pet.getPetAge());
intent.putExtra("petPrice", pet.getPetPrice());
intent.putExtra("petStatus", pet.getPetStatus());
context.startActivity(intent);
});
}
@Override
public int getItemCount() {
return petList.size();
}
}

View File

@@ -0,0 +1,77 @@
package com.example.petstoremobile.adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.ServiceDetailActivity;
import com.example.petstoremobile.models.Service;
import java.util.List;
public class ServiceAdapter extends RecyclerView.Adapter<ServiceAdapter.ServiceViewHolder> {
private List<Service> serviceList;
private Context context;
//Constructor
public ServiceAdapter(List<Service> serviceList, Context context) {
this.serviceList = serviceList;
this.context = context;
}
//Get controls of each row in recycler view
public static class ServiceViewHolder extends RecyclerView.ViewHolder {
TextView tvServiceName, tvServiceDesc, tvServiceDuration, tvServicePrice;
public ServiceViewHolder(@NonNull View v) {
super(v);
tvServiceName = v.findViewById(R.id.tvServiceName);
tvServiceDesc = v.findViewById(R.id.tvServiceDesc);
tvServiceDuration = v.findViewById(R.id.tvServiceDuration);
tvServicePrice = v.findViewById(R.id.tvServicePrice);
}
}
//Create a new row view
@NonNull
@Override
public ServiceViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(context).inflate(R.layout.item_service, parent, false);
return new ServiceViewHolder(v);
}
//Populate the row with service data
@Override
public void onBindViewHolder(@NonNull ServiceViewHolder holder, int position) {
Service service = serviceList.get(position);
holder.tvServiceName.setText(service.getServiceName());
holder.tvServiceDesc.setText(service.getServiceDesc());
holder.tvServiceDuration.setText("Duration: " + service.getServiceDuration() + " min");
holder.tvServicePrice.setText("$" + String.format("%.2f", service.getServicePrice()));
//Set click listener for each row
holder.itemView.setOnClickListener(v -> {
Intent intent = new Intent(context, ServiceDetailActivity.class);
intent.putExtra("serviceId", service.getServiceId());
intent.putExtra("serviceName", service.getServiceName());
intent.putExtra("serviceDesc", service.getServiceDesc());
intent.putExtra("serviceDuration", service.getServiceDuration());
intent.putExtra("servicePrice", service.getServicePrice());
context.startActivity(intent);
});
}
@Override
public int getItemCount() {
return serviceList.size();
}
}

View File

@@ -0,0 +1,78 @@
package com.example.petstoremobile.adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.petstoremobile.R;
import com.example.petstoremobile.activities.detailactivites.SupplierDetailActivity;
import com.example.petstoremobile.models.Supplier;
import java.util.List;
public class SupplierAdapter extends RecyclerView.Adapter<SupplierAdapter.SupplierViewHolder> {
private List<Supplier> supplierList;
private Context context;
//Constructor
public SupplierAdapter(List<Supplier> supplierList, Context context) {
this.supplierList = supplierList;
this.context = context;
}
//Get controls of each row in recycler view
public static class SupplierViewHolder extends RecyclerView.ViewHolder {
TextView tvSupCompany, tvSupContactName, tvSupEmail, tvSupPhone;
public SupplierViewHolder(@NonNull View v) {
super(v);
tvSupCompany = v.findViewById(R.id.tvSupCompany);
tvSupContactName = v.findViewById(R.id.tvSupContactName);
tvSupEmail = v.findViewById(R.id.tvSupEmail);
tvSupPhone = v.findViewById(R.id.tvSupPhone);
}
}
//Create a new row view
@NonNull
@Override
public SupplierViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(context).inflate(R.layout.item_supplier, parent, false);
return new SupplierViewHolder(v);
}
//Populate the row with supplier data
@Override
public void onBindViewHolder(@NonNull SupplierViewHolder holder, int position) {
Supplier supplier = supplierList.get(position);
holder.tvSupCompany.setText(supplier.getSupCompany());
holder.tvSupContactName.setText(supplier.getSupContactFirstName() + " " + supplier.getSupContactLastName());
holder.tvSupEmail.setText(supplier.getSupEmail());
holder.tvSupPhone.setText(supplier.getSupPhone());
//Set click listener for each row
holder.itemView.setOnClickListener(v -> {
Intent intent = new Intent(context, SupplierDetailActivity.class);
intent.putExtra("supId", supplier.getSupId());
intent.putExtra("supCompany", supplier.getSupCompany());
intent.putExtra("supContactFirstName", supplier.getSupContactFirstName());
intent.putExtra("supContactLastName", supplier.getSupContactLastName());
intent.putExtra("supEmail", supplier.getSupEmail());
intent.putExtra("supPhone", supplier.getSupPhone());
context.startActivity(intent);
});
}
@Override
public int getItemCount() {
return supplierList.size();
}
}

View File

@@ -0,0 +1,79 @@
package com.example.petstoremobile.models;
public class Pet {
private int petId;
private String petName;
private String petSpecies;
private String petBreed;
private int petAge;
private String petStatus;
private double petPrice;
//constructor
public Pet(int petId, String petName, String petSpecies, String petBreed, int petAge, String petStatus, double petPrice) {
this.petId = petId;
this.petName = petName;
this.petSpecies = petSpecies;
this.petBreed = petBreed;
this.petAge = petAge;
this.petStatus = petStatus;
this.petPrice = petPrice;
}
//getter and setters
public int getPetId() {
return petId;
}
// public void setPetId(int petId) {
// this.petId = petId;
// }
public String getPetName() {
return petName;
}
public void setPetName(String petName) {
this.petName = petName;
}
public String getPetSpecies() {
return petSpecies;
}
public void setPetSpecies(String petSpecies) {
this.petSpecies = petSpecies;
}
public String getPetBreed() {
return petBreed;
}
public void setPetBreed(String petBreed) {
this.petBreed = petBreed;
}
public int getPetAge() {
return petAge;
}
public void setPetAge(int petAge) {
this.petAge = petAge;
}
public String getPetStatus() {
return petStatus;
}
public void setPetStatus(String petStatus) {
this.petStatus = petStatus;
}
public double getPetPrice() {
return petPrice;
}
public void setPetPrice(double petPrice) {
this.petPrice = petPrice;
}
}

View File

@@ -0,0 +1,59 @@
package com.example.petstoremobile.models;
public class Service {
private int serviceId;
private String serviceName;
private String serviceDesc;
private int serviceDuration;
private double servicePrice;
// Constructor
public Service(int serviceId, String serviceName, String serviceDesc, int serviceDuration, double servicePrice) {
this.serviceId = serviceId;
this.serviceName = serviceName;
this.serviceDesc = serviceDesc;
this.serviceDuration = serviceDuration;
this.servicePrice = servicePrice;
}
//getter and setters
public int getServiceId() {
return serviceId;
}
// public void setServiceId(int serviceId) {
// this.serviceId = serviceId;
// }
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getServiceDesc() {
return serviceDesc;
}
public void setServiceDesc(String serviceDesc) {
this.serviceDesc = serviceDesc;
}
public int getServiceDuration() {
return serviceDuration;
}
public void setServiceDuration(int serviceDuration) {
this.serviceDuration = serviceDuration;
}
public double getServicePrice() {
return servicePrice;
}
public void setServicePrice(double servicePrice) {
this.servicePrice = servicePrice;
}
}

View File

@@ -0,0 +1,70 @@
package com.example.petstoremobile.models;
public class Supplier {
private int supId;
private String supCompany;
private String supContactFirstName;
private String supContactLastName;
private String supEmail;
private String supPhone;
// Constructor
public Supplier(int supId, String supCompany, String supContactFirstName, String supContactLastName, String supEmail, String supPhone) {
this.supId = supId;
this.supCompany = supCompany;
this.supContactFirstName = supContactFirstName;
this.supContactLastName = supContactLastName;
this.supEmail = supEmail;
this.supPhone = supPhone;
}
//getter and setters
public int getSupId() {
return supId;
}
// public void setSupId(int supId) {
// this.supId = supId;
// }
public String getSupCompany() {
return supCompany;
}
public void setSupCompany(String supCompany) {
this.supCompany = supCompany;
}
public String getSupContactFirstName() {
return supContactFirstName;
}
public void setSupContactFirstName(String supContactFirstName) {
this.supContactFirstName = supContactFirstName;
}
public String getSupContactLastName() {
return supContactLastName;
}
public void setSupContactLastName(String supContactLastName) {
this.supContactLastName = supContactLastName;
}
public String getSupEmail() {
return supEmail;
}
public void setSupEmail(String supEmail) {
this.supEmail = supEmail;
}
public String getSupPhone() {
return supPhone;
}
public void setSupPhone(String supPhone) {
this.supPhone = supPhone;
}
}

View File

@@ -0,0 +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="#3DDC84"
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>

View File

@@ -0,0 +1,30 @@
<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:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
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="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@@ -0,0 +1,19 @@
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.AdoptionActivity">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="adoption"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,19 @@
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.AppointmentActivity">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Appointments"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,19 @@
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.InventoryActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="inventory"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:padding="32dp"
android:background="#F5F5F5">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:src="@tools:sample/avatars" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="Leon's Petstore"
android:textSize="32sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Welcome back"
android:textSize="16sp"
android:textColor="#888888"
android:layout_marginBottom="40dp"/>
<EditText
android:id="@+id/etUser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Username"
android:inputType="text" />
<EditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="24dp"
android:hint="Password"
android:inputType="textPassword" />
<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:text="Log In" />
<TextView
android:id="@+id/tvLoginStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="Login Status"
android:textAlignment="center"
android:textColor="#C31919" />
</LinearLayout>

View File

@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tvMode"
android:layout_width="143dp"
android:layout_height="48dp"
android:fontFamily="sans-serif-black"
android:text="Add Pet"
android:textColor="@color/black"
android:textSize="25sp" />
<Button
android:id="@+id/btnDeletePet"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:text="Delete" />
</LinearLayout>
<TextView
android:id="@+id/tvPetId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="30dp"
android:text="ID: 0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Pet Name"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etPetName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter pet name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Species"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etPetSpecies"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="e.g. Dog, Cat, Bird"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Breed"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etPetBreed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter breed"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Age"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etPetAge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter age"
android:inputType="number" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Price"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etPetPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter price"
android:inputType="numberDecimal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Status"
android:textColor="@color/black"
android:textSize="12sp" />
<Spinner
android:id="@+id/spinnerPetStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="32dp" />
<!-- Save button always visible -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<Button
android:id="@+id/btnBack"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Back" />
<Button
android:id="@+id/btnSavePet"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Save" />
</LinearLayout>
<!-- Delete button only visible when editing -->
</LinearLayout>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5">
<!-- The list of pets -->
<!-- Floating add button in the bottom right corner -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewPets"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabAddPet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:contentDescription="Add Pet"
app:srcCompat="@android:drawable/ic_input_add"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -0,0 +1,19 @@
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.ProductActivity">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="products"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tvMode"
android:layout_width="162dp"
android:layout_height="48dp"
android:fontFamily="sans-serif-black"
android:text="Add Service"
android:textColor="@color/black"
android:textSize="25sp" />
<Button
android:id="@+id/btnDeleteService"
android:layout_width="113dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Delete" />
</LinearLayout>
<TextView
android:id="@+id/tvServiceId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="30dp"
android:text="ID: 0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Service Name"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etServiceName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter service name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Description"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etServiceDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter description"
android:inputType="textMultiLine"
android:minLines="2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Duration (minutes)"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etServiceDuration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter duration in minutes"
android:inputType="number" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Price"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etServicePrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="32dp"
android:hint="Enter price"
android:inputType="numberDecimal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<Button
android:id="@+id/btnBack"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Back" />
<Button
android:id="@+id/btnSaveService"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Save" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewServices"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabAddService"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:contentDescription="Add Service"
app:srcCompat="@android:drawable/ic_input_add"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewSuppliers"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabAddSupplier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:contentDescription="Add Supplier"
app:srcCompat="@android:drawable/ic_input_add"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F5F5"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tvMode"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:fontFamily="sans-serif-black"
android:text="Add Supplier"
android:textColor="@color/black"
android:textSize="25sp" />
<Button
android:id="@+id/btnDeleteSupplier"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:text="Delete" />
</LinearLayout>
<TextView
android:id="@+id/tvSupId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="30dp"
android:text="ID: 0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Company Name"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etSupCompany"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter company name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Contact First Name"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etSupContactFirstName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter first name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Contact Last Name"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etSupContactLastName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter last name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Email"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etSupEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="16dp"
android:hint="Enter email"
android:inputType="textEmailAddress" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="4dp"
android:text="Phone"
android:textColor="@color/black"
android:textSize="12sp" />
<EditText
android:id="@+id/etSupPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="32dp"
android:hint="Enter phone number"
android:inputType="phone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal">
<Button
android:id="@+id/btnBack"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Back" />
<Button
android:id="@+id/btnSaveSupplier"
android:layout_width="121dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:text="Save" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp"
android:background="@android:color/white">
<!-- Pet name and status on the same row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tvPetName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Pet Name"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tvPetStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#4CAF50"
android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp"
android:text="Pet Status"
android:textColor="#FFFFFF"
android:textSize="12sp" />
</LinearLayout>
<!-- Species and breed -->
<TextView
android:id="@+id/tvPetSpeciesBreed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="pet species and breed"
android:textColor="#666666"
android:textSize="14sp" />
<!-- Age and price on the same row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="4dp">
<TextView
android:id="@+id/tvPetAge"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="pet age"
android:textColor="#666666"
android:textSize="14sp" />
<TextView
android:id="@+id/tvPetPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="pet price"
android:textColor="#2196F3"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<!-- Divider line between items -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EEEEEE"
android:layout_marginTop="12dp"/>
</LinearLayout>

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp"
android:background="@android:color/white">
<!-- Service name -->
<TextView
android:id="@+id/tvServiceName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Service Name"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold" />
<!-- Service description -->
<TextView
android:id="@+id/tvServiceDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Service Desc"
android:textColor="#666666"
android:textSize="14sp" />
<!-- Duration and price on the same row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<TextView
android:id="@+id/tvServiceDuration"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Service Duration"
android:textColor="#666666"
android:textSize="14sp" />
<TextView
android:id="@+id/tvServicePrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Service Price"
android:textColor="#2196F3"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<!-- Divider -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EEEEEE"
android:layout_marginTop="12dp"/>
</LinearLayout>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp"
android:background="@android:color/white">
<!-- Company name -->
<TextView
android:id="@+id/tvSupCompany"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SupCompany"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold" />
<!-- Contact name -->
<TextView
android:id="@+id/tvSupContactName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="SupContact"
android:textColor="#666666"
android:textSize="14sp" />
<!-- Email and phone on the same row -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<TextView
android:id="@+id/tvSupEmail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="SupEmail"
android:textColor="#666666"
android:textSize="14sp" />
<TextView
android:id="@+id/tvSupPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sup phone"
android:textColor="#2196F3"
android:textSize="14sp" />
</LinearLayout>
<!-- Divider -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EEEEEE"
android:layout_marginTop="12dp"/>
</LinearLayout>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_pets"
android:title="Pets"/>
<item
android:id="@+id/menu_adoption"
android:title="Adoptions"/>
<item
android:id="@+id/menu_services"
android:title="Services"/>
<item
android:id="@+id/menu_appointments"
android:title="Appointments"/>
<item
android:id="@+id/menu_inventory"
android:title="Inventory"/>
<item
android:id="@+id/menu_products"
android:title="Products"/>
<item
android:id="@+id/menu_suppliers"
android:title="Suppliers"/>
</menu>

View File

@@ -0,0 +1,6 @@
<?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" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -0,0 +1,6 @@
<?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" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.PetStoreMobile" parent="Theme.Material3.DayNight">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Leons Pet Store</string>
</resources>

View File

@@ -0,0 +1,9 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.PetStoreMobile" parent="Theme.Material3.DayNight">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
<style name="Theme.PetStoreMobile" parent="Base.Theme.PetStoreMobile" />
</resources>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older than API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>

View File

@@ -0,0 +1,17 @@
package com.example.petstoremobile;
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);
}
}