-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
736 additions
and
15 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/example/vehiclehealth/AddFuelRefillActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.minor2; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.AdapterView; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.AutoCompleteTextView; | ||
import android.widget.TextView; | ||
|
||
import com.google.android.material.button.MaterialButton; | ||
|
||
public class AddFuelRefillActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_add_fuel_refill); | ||
|
||
|
||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
app/src/main/java/com/example/vehiclehealth/AddVehicleActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.example.minor2; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
|
||
import com.google.android.material.button.MaterialButton; | ||
import com.google.android.material.snackbar.Snackbar; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.view.View; | ||
|
||
import androidx.core.view.WindowCompat; | ||
import androidx.navigation.NavController; | ||
import androidx.navigation.Navigation; | ||
import androidx.navigation.ui.AppBarConfiguration; | ||
import androidx.navigation.ui.NavigationUI; | ||
|
||
|
||
public class AddVehicleActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
|
||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_add_vehicle); | ||
|
||
MaterialButton btn_add = (MaterialButton) findViewById(R.id.btn_add); | ||
MaterialButton btn_cancel = (MaterialButton) findViewById(R.id.btn_cancel); | ||
|
||
btn_add.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(AddVehicleActivity.this,MyVehicleActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
btn_cancel.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(AddVehicleActivity.this,MainDashboard.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
|
||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
app/src/main/java/com/example/vehiclehealth/IndividualVehicleDetailActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.example.minor2; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
|
||
import com.google.android.material.button.MaterialButton; | ||
import com.google.android.material.snackbar.Snackbar; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.view.View; | ||
|
||
import androidx.navigation.ui.AppBarConfiguration; | ||
|
||
|
||
public class IndividualVehicleDetailActivity extends AppCompatActivity { | ||
|
||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_individual_vehicle_detail); | ||
|
||
MaterialButton edit_btn = (MaterialButton) findViewById(R.id.btn_edit); | ||
MaterialButton back_btn = (MaterialButton) findViewById(R.id.btn_back); | ||
|
||
edit_btn.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(IndividualVehicleDetailActivity.this,UpdateServiceDateActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
back_btn.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(IndividualVehicleDetailActivity.this,MyVehicleActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
app/src/main/java/com/example/vehiclehealth/KhaltiTry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.example.minor2; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.recyclerview.widget.LinearLayoutManager; | ||
import androidx.recyclerview.widget.RecyclerView; | ||
|
||
import android.graphics.drawable.Drawable; | ||
import android.os.Bundle; | ||
|
||
import com.example.minor2.ProductModel; | ||
import com.example.minor2.RecyclerAdapter; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class KhaltiTry extends AppCompatActivity { | ||
|
||
RecyclerView rvProducts; | ||
RecyclerAdapter myAdapter; | ||
LinearLayoutManager layoutManager; | ||
List<ProductModel> myProducts = new ArrayList<>(); | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_confirm_appointment); | ||
|
||
rvProducts = findViewById(R.id.rv_products); | ||
layoutManager = new LinearLayoutManager(getApplicationContext(),RecyclerView.VERTICAL,false); | ||
|
||
rvProducts.setLayoutManager(layoutManager); | ||
|
||
// Drawable drawable1 = getResources(getIdentifier("ic_product1", "drawable", getPackageName()); | ||
// Drawable drawable1 = getResources().getDrawable(getResources() | ||
// .getIdentifier("ic_product1", "drawable", getPackageName())); | ||
|
||
myProducts.add(new ProductModel("Hyundai Creta","Ba-10-PA-8560","Regular Maintenance","30/07/2023",1000L,"0011")); | ||
|
||
myAdapter = new RecyclerAdapter(this,myProducts); | ||
rvProducts.setAdapter(myAdapter); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
app/src/main/java/com/example/vehiclehealth/MainDashboard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package com.example.minor2; | ||
|
||
import androidx.appcompat.app.AlertDialog; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.cardview.widget.CardView; | ||
|
||
|
||
import android.annotation.SuppressLint; | ||
import android.content.DialogInterface; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
import android.widget.Toast; | ||
|
||
public class MainDashboard extends AppCompatActivity { | ||
|
||
TextView view_all, my_car, home,booking,history,profile, total_km, last_servicing, fuel_refill ; | ||
|
||
|
||
@SuppressLint("MissingInflatedId") | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_dashboard); | ||
|
||
view_all =(TextView)findViewById(R.id.viewAll); | ||
my_car = (TextView) findViewById(R.id.my_car); | ||
booking = (TextView) findViewById(R.id.booking); | ||
history = (TextView) findViewById(R.id.history); | ||
profile = (TextView) findViewById(R.id.profile); | ||
home = (TextView) findViewById(R.id.home); | ||
|
||
|
||
my_car.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,MyVehicleActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
|
||
booking.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,VehicleBookingInfoActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
history.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,ServicesActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
profile.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,UserProfileActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
home.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,MainDashboard.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
view_all.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MainDashboard.this,ServicesActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
// last_servicing.setOnClickListener(new View.OnClickListener() { | ||
// @Override | ||
// public void onClick(View v) { | ||
// Intent i = new Intent(MainDashboard.this,UpdateServiceDateActivity.class); | ||
// startActivity(i); | ||
// } | ||
// }); | ||
|
||
// fuel_refill.setOnClickListener(new View.OnClickListener() { | ||
// @Override | ||
// public void onClick(View v) { | ||
// Intent i = new Intent(MainDashboard.this,AddFuelRefillActivity.class); | ||
// startActivity(i); | ||
// } | ||
// }); | ||
|
||
} | ||
} |
28 changes: 27 additions & 1 deletion
28
app/src/main/java/com/example/vehiclehealth/MyVehicleActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
package com.example.minor2; | ||
|
||
public class MyVehicleActivity { | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import com.google.android.material.button.MaterialButton; | ||
|
||
public class MyVehicleActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_my_vehicle); | ||
|
||
TextView viewDetail = (TextView) findViewById(R.id.view1); | ||
|
||
viewDetail.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Intent i = new Intent(MyVehicleActivity.this,IndividualVehicleDetailActivity.class); | ||
startActivity(i); | ||
} | ||
}); | ||
|
||
} | ||
} |
Oops, something went wrong.