Skip to content

Commit

Permalink
Update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasstrh committed Jun 9, 2020
1 parent 6b282df commit 57d863b
Show file tree
Hide file tree
Showing 24 changed files with 476 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,24 @@ protected void onCreate(Bundle savedInstanceState) {
adapterSpecialiteList.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
specialiteList.setAdapter(adapterSpecialiteList);
String newAccountType = spinner.getSelectedItem().toString();
/*
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
String selected = spinner.getSelectedItem().toString();
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (newAccountType.equals("Patient")) {
specialiteList.setVisibility(View.GONE);
} else {
if (selected.equals("Doctor")) {
specialiteList.setVisibility(View.VISIBLE);
} else {
specialiteList.setVisibility(View.GONE);
}
}

@Override
public void onNothingSelected(AdapterView<?> adapterView) {
specialiteList.setVisibility(View.GONE);
}
;
});

*/


btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
19 changes: 14 additions & 5 deletions app/src/main/java/com/ensias/healthcareapp/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ public class HomeActivity extends AppCompatActivity {
Button searchPatBtn;
Button myDoctors;
Button BtnRequst;
Button profilebtn;
Button profile;
Button appointment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
appointment = findViewById(R.id.appointement2);
appointment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k = new Intent(HomeActivity.this, PatientAppointementsActivity.class);
startActivity(k);
}
});
searchPatBtn = (Button)findViewById(R.id.searchBtn);
searchPatBtn.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down Expand Up @@ -61,12 +70,12 @@ public void onClick(View v) {
}
});

profilebtn = findViewById(R.id.profile);
profilebtn.setOnClickListener(new View.OnClickListener() {
profile = findViewById(R.id.profile);
profile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Intent k = new Intent(HomeActivity.this, .class);
//startActivity(k);
Intent k = new Intent(HomeActivity.this, ProfilePatientActivity.class);
startActivity(k);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.google.firebase.firestore.Query;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

Expand All @@ -23,8 +24,8 @@ public class MyPatientsActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_patients);

setUpRecyclerView();

}

public void setUpRecyclerView(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ protected void onBindViewHolder(@NonNull PatientAppointmentsHolder patientAppoin

}
if(apointementInformation.getType().equals("Accepted")){
patientAppointmentsHolder.type.setTextColor(Color.GREEN);
patientAppointmentsHolder.type.setTextColor(Color.parseColor("#20bf6b"));
}else if(apointementInformation.getType().equals("Checked")){
patientAppointmentsHolder.type.setTextColor(Color.BLUE);
patientAppointmentsHolder.type.setTextColor(Color.parseColor("#8854d0"));
}else{
patientAppointmentsHolder.type.setTextColor(Color.RED);
patientAppointmentsHolder.type.setTextColor(Color.parseColor("#eb3b5a"));
}

}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/button_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="https://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#22BE87"/>
<corners android:radius="5dp"/>
</shape>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_appointement.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:aapt="https://schemas.android.com/aapt"
android:width="55dp"
android:height="55dp"
android:viewportWidth="55"
android:viewportHeight="55">
<path
android:pathData="M45.8333,6.875H43.5417V2.2917H38.9583V6.875H16.0417V2.2917H11.4583V6.875H9.1667C6.6458,6.875 4.5833,8.9375 4.5833,11.4583V48.125C4.5833,50.6458 6.6458,52.7083 9.1667,52.7083H45.8333C48.3542,52.7083 50.4167,50.6458 50.4167,48.125V11.4583C50.4167,8.9375 48.3542,6.875 45.8333,6.875ZM45.8333,48.125H9.1667V18.3333H45.8333V48.125Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.29166"
android:startX="27.5"
android:endY="52.7083"
android:endX="27.5"
android:type="linear">
<item android:offset="0" android:color="#FF38EF7D"/>
<item android:offset="1" android:color="#FF22BE87"/>
</gradient>
</aapt:attr>
</path>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_assignment_ind_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#22BE87"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="https://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM12,7c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM18,19L6,19v-1.4c0,-2 4,-3.1 6,-3.1s6,1.1 6,3.1L18,19z"/>
</vector>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_calendar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:aapt="https://schemas.android.com/aapt"
android:width="67dp"
android:height="67dp"
android:viewportWidth="67"
android:viewportHeight="67">
<path
android:pathData="M46.1463,30.8758L43.1871,27.9167L29.5638,41.54L23.6454,35.6217L20.6862,38.5808L29.5638,47.4583L46.1463,30.8758ZM53.0417,8.375H50.25V2.7917H44.6667V8.375H22.3333V2.7917H16.75V8.375H13.9583C10.8596,8.375 8.4029,10.8875 8.4029,13.9583L8.375,53.0417C8.375,56.1125 10.8596,58.625 13.9583,58.625H53.0417C56.1125,58.625 58.625,56.1125 58.625,53.0417V13.9583C58.625,10.8875 56.1125,8.375 53.0417,8.375ZM53.0417,53.0417H13.9583V22.3333H53.0417V53.0417Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.79166"
android:startX="33.5"
android:endY="58.625"
android:endX="33.5"
android:type="linear">
<item android:offset="0" android:color="#FF38EF7D"/>
<item android:offset="1" android:color="#FF22BE87"/>
</gradient>
</aapt:attr>
</path>
</vector>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_person.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:aapt="https://schemas.android.com/aapt"
android:width="61dp"
android:height="64dp"
android:viewportWidth="61"
android:viewportHeight="64">
<path
android:pathData="M30.5,32C36.1171,32 40.6667,27.2267 40.6667,21.3334C40.6667,15.44 36.1171,10.6667 30.5,10.6667C24.8829,10.6667 20.3333,15.44 20.3333,21.3334C20.3333,27.2267 24.8829,32 30.5,32ZM30.5,37.3334C23.7137,37.3334 10.1667,40.9067 10.1667,48V53.3334H50.8333V48C50.8333,40.9067 37.2862,37.3334 30.5,37.3334Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="10.6667"
android:startX="30.5"
android:endY="53.3334"
android:endX="30.5"
android:type="linear">
<item android:offset="0" android:color="#FF38EF7D"/>
<item android:offset="1" android:color="#FF22BE87"/>
</gradient>
</aapt:attr>
</path>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_person_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#22BE87"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#22BE87"
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z" />
</vector>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:aapt="https://schemas.android.com/aapt"
android:width="54dp"
android:height="54dp"
android:viewportWidth="54"
android:viewportHeight="54">
<path
android:pathData="M42.75,11.25V42.75H11.25V11.25H42.75ZM45.225,6.75H8.775C7.65,6.75 6.75,7.65 6.75,8.775V45.225C6.75,46.125 7.65,47.25 8.775,47.25H45.225C46.125,47.25 47.25,46.125 47.25,45.225V8.775C47.25,7.65 46.125,6.75 45.225,6.75ZM24.75,15.75H38.25V20.25H24.75V15.75ZM24.75,24.75H38.25V29.25H24.75V24.75ZM24.75,33.75H38.25V38.25H24.75V33.75ZM15.75,15.75H20.25V20.25H15.75V15.75ZM15.75,24.75H20.25V29.25H15.75V24.75ZM15.75,33.75H20.25V38.25H15.75V33.75Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="6.75"
android:startX="27"
android:endY="47.25"
android:endX="27"
android:type="linear">
<item android:offset="0" android:color="#FF38EF7D"/>
<item android:offset="1" android:color="#FF22BE87"/>
</gradient>
</aapt:attr>
</path>
</vector>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_request.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:aapt="https://schemas.android.com/aapt"
android:width="75dp"
android:height="75dp"
android:viewportWidth="75"
android:viewportHeight="75">
<path
android:pathData="M25,31.25H15.625V21.875H9.375V31.25H0V37.5H9.375V46.875H15.625V37.5H25V31.25ZM56.25,34.375C61.4375,34.375 65.5938,30.1875 65.5938,25C65.5938,19.8125 61.4375,15.625 56.25,15.625C55.25,15.625 54.2812,15.7812 53.4062,16.0625C55.1875,18.5937 56.2188,21.6562 56.2188,25C56.2188,28.3438 55.1562,31.375 53.4062,33.9375C54.2812,34.2187 55.25,34.375 56.25,34.375ZM40.625,34.375C45.8125,34.375 49.9688,30.1875 49.9688,25C49.9688,19.8125 45.8125,15.625 40.625,15.625C35.4375,15.625 31.25,19.8125 31.25,25C31.25,30.1875 35.4375,34.375 40.625,34.375ZM61.3125,41.125C63.9063,43.4062 65.625,46.3125 65.625,50V56.25H75V50C75,45.1875 67.5938,42.2188 61.3125,41.125ZM40.625,40.625C34.375,40.625 21.875,43.75 21.875,50V56.25H59.375V50C59.375,43.75 46.875,40.625 40.625,40.625Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="15.625"
android:startX="37.5"
android:endY="56.25"
android:endX="37.5"
android:type="linear">
<item android:offset="0" android:color="#FF38EF7D"/>
<item android:offset="1" android:color="#FF22BE87"/>
</gradient>
</aapt:attr>
</path>
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/main_header_selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<shape>
<gradient
android:angle="90"
android:startColor="#654ea3"
android:endColor="#eaafc8"
android:startColor="#38EF7D"
android:endColor="#117B99"
android:type="linear" />
</shape>
</item>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/primary_gradient_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="https://schemas.android.com/apk/res/android">

</selector>
19 changes: 19 additions & 0 deletions app/src/main/res/drawable/rectangle_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="https://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" />
</item>
<item
android:bottom="10dp"
android:left="-100dp"
android:right="-100dp"
android:top="-80dp">
<shape android:shape="oval">
<gradient
android:angle="90"
android:startColor="#38EF7D"
android:endColor="#117B99"
android:type="linear" />
</shape>
</item>
</layer-list>
Loading

0 comments on commit 57d863b

Please sign in to comment.