Skip to content

Commit

Permalink
1. Added back button to Patient sign up page and fixed hidden title i…
Browse files Browse the repository at this point in the history
…n activity_doctor_view_availability.xml
  • Loading branch information
youssefisk committed Aug 11, 2021
1 parent 1d75c97 commit eefd622
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.b07project.user_information;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
Expand All @@ -16,6 +17,7 @@
import android.text.TextWatcher;
import android.util.Log;
import android.util.Patterns;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
Expand Down Expand Up @@ -51,6 +53,12 @@ public class PatientSignup extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_patient_signup);


ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);


getSupportActionBar().setTitle("Create An Account");
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#2E5DA3")));

Expand Down Expand Up @@ -261,4 +269,14 @@ public void navigateToPatientActivity(){
startActivity(navigateToPatientIntent);
}

@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item){
switch (item.getItemId()){
case android.R.id.home:
this.finish();
return true;
}
return super.onOptionsItemSelected(item);
}

}
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_doctor_view_availability.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginTop="50dp"
android:gravity="center"
android:text="Here are your schedule:"
android:text="Here is your schedule:"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold"
Expand Down

0 comments on commit eefd622

Please sign in to comment.