Merge pull request #6 from LinlyBoi/Guest_Login

Guest Login
This commit is contained in:
Linly
2023-12-20 10:02:03 +02:00
committed by GitHub
4 changed files with 35 additions and 3 deletions

View File

@@ -34,6 +34,9 @@ dependencies {
implementation("com.google.android.material:material:1.10.0") implementation("com.google.android.material:material:1.10.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.android.gms:play-services-maps:18.2.0") implementation("com.google.android.gms:play-services-maps:18.2.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

View File

@@ -19,7 +19,10 @@ public class LoginActivity extends AppCompatActivity {
TextView forgetpassword; TextView forgetpassword;
Button login; Button login;
Button signup; Button signup;
DBOperations dbOperations = new DBOperations(this); DBOperations dbOperations = new DBOperations(this);
Button guestLogin;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -30,7 +33,7 @@ public class LoginActivity extends AppCompatActivity {
forgetpassword = findViewById(R.id.forgetpass); forgetpassword = findViewById(R.id.forgetpass);
login = findViewById(R.id.button); login = findViewById(R.id.button);
signup = findViewById(R.id.button2); signup = findViewById(R.id.button2);
guestLogin= findViewById(R.id.button3);
forgetpassword.setOnClickListener(new View.OnClickListener() { forgetpassword.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@@ -45,6 +48,16 @@ public class LoginActivity extends AppCompatActivity {
startActivity(newScreen); startActivity(newScreen);
} }
}); });
guestLogin.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent newScreen = new Intent(getApplicationContext(), HomeActivity.class);
startActivity(newScreen);
}
});
login.setOnClickListener(new View.OnClickListener() { login.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View File

@@ -87,9 +87,25 @@
android:text="SignUp" android:text="SignUp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.487" app:layout_constraintHorizontal_bias="0.407"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button" app:layout_constraintTop_toBottomOf="@+id/button"
app:layout_constraintVertical_bias="0.0" /> app:layout_constraintVertical_bias="0.0" />
<Button
android:id="@+id/button3"
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:layout_width="372dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:background="#2155F3"
android:backgroundTint="#2155F3"
android:text="Guest Login"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.41"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button"
app:layout_constraintVertical_bias="0.278" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,7 +2,7 @@
<resources> <resources>
<!-- begin styles --> <!-- begin styles -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light"> <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
</style> </style>