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

15
.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
.idea/AndroidProjectSystem.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

6
.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="21" />
</component>
</project>

18
.idea/deploymentTargetSelector.xml generated Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2026-03-01T21:58:46.043023800Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\Alex\.android\avd\Pixel_9.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>
</project>

13
.idea/deviceManager.xml generated Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeviceTable">
<option name="columnSorters">
<list>
<ColumnSorterState>
<option name="column" value="Name" />
<option name="order" value="ASCENDING" />
</ColumnSorterState>
</list>
</option>
</component>
</project>

19
.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

10
.idea/migrations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

9
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

17
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

6
.idea/studiobot.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="StudioBotProjectSettings">
<option name="shareContext" value="OptedIn" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

46
app/build.gradle.kts Normal file
View File

@@ -0,0 +1,46 @@
plugins {
alias(libs.plugins.android.application)
}
android {
namespace = "com.example.petstoremobile"
compileSdk {
version = release(36)
}
defaultConfig {
applicationId = "com.example.petstoremobile"
minSdk = 24
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
dependencies {
implementation(libs.appcompat)
implementation(libs.material)
implementation(libs.activity)
implementation(libs.constraintlayout)
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.viewpager2:viewpager2:1.1.0")
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
}

21
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

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);
}
}

4
build.gradle.kts Normal file
View File

@@ -0,0 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
}

21
gradle.properties Normal file
View File

@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

22
gradle/libs.versions.toml Normal file
View File

@@ -0,0 +1,22 @@
[versions]
agp = "9.0.1"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
appcompat = "1.7.1"
material = "1.13.0"
activity = "1.12.4"
constraintlayout = "2.2.1"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,9 @@
#Sun Mar 01 14:36:37 MST 2026
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

251
gradlew vendored Normal file
View File

@@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

94
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

24
settings.gradle.kts Normal file
View File

@@ -0,0 +1,24 @@
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "PetStoreMobile"
include(":app")