├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── epicodus
│ │ └── checkup
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ └── fonts
│ │ │ └── Questrial-Regular.otf
│ ├── java
│ │ └── com
│ │ │ └── epicodus
│ │ │ └── checkup
│ │ │ ├── Constants.java
│ │ │ ├── adapters
│ │ │ ├── AilmentPagerAdapter.java
│ │ │ ├── AllAilmentsListAdapter.java
│ │ │ ├── DoctorListAdapter.java
│ │ │ ├── DoctorPagerAdapter.java
│ │ │ └── FirebaseDoctorViewHolder.java
│ │ │ ├── models
│ │ │ ├── Ailment.java
│ │ │ └── Doctor.java
│ │ │ ├── services
│ │ │ └── BetterDoctorService.java
│ │ │ └── ui
│ │ │ ├── AboutActivity.java
│ │ │ ├── AilmentDetailActivity.java
│ │ │ ├── AilmentDetailFragment.java
│ │ │ ├── AilmentsListActivity.java
│ │ │ ├── AppointmentFormActivity.java
│ │ │ ├── AppointmentsActivity.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── CreateAccountActivity.java
│ │ │ ├── DoctorDetailActivity.java
│ │ │ ├── DoctorDetailFragment.java
│ │ │ ├── DoctorListActivity.java
│ │ │ ├── FindDoctorActivity.java
│ │ │ ├── HealthActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── NavigationDrawerActivity.java
│ │ │ └── SavedDoctorListActivity.java
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── ic_add_shopping_cart_black_24dp.png
│ │ ├── ic_done_black_24dp.png
│ │ ├── ic_favorite_border_black_24dp.png
│ │ ├── ic_home_black_24dp.png
│ │ ├── ic_local_hospital_black_24dp.png
│ │ └── ic_today_black_24dp.png
│ │ ├── drawable-mdpi
│ │ ├── ic_add_shopping_cart_black_24dp.png
│ │ ├── ic_done_black_24dp.png
│ │ ├── ic_favorite_border_black_24dp.png
│ │ ├── ic_home_black_24dp.png
│ │ ├── ic_local_hospital_black_24dp.png
│ │ ├── ic_today_black_24dp.png
│ │ └── logo_round_medium.png
│ │ ├── drawable-xhdpi
│ │ ├── ic_add_shopping_cart_black_24dp.png
│ │ ├── ic_done_black_24dp.png
│ │ ├── ic_favorite_border_black_24dp.png
│ │ ├── ic_home_black_24dp.png
│ │ ├── ic_local_hospital_black_24dp.png
│ │ └── ic_today_black_24dp.png
│ │ ├── drawable-xxhdpi
│ │ ├── ic_add_shopping_cart_black_24dp.png
│ │ ├── ic_done_black_24dp.png
│ │ ├── ic_favorite_border_black_24dp.png
│ │ ├── ic_home_black_24dp.png
│ │ ├── ic_local_hospital_black_24dp.png
│ │ └── ic_today_black_24dp.png
│ │ ├── drawable-xxxhdpi
│ │ ├── ic_add_shopping_cart_black_24dp.png
│ │ ├── ic_done_black_24dp.png
│ │ ├── ic_favorite_border_black_24dp.png
│ │ ├── ic_home_black_24dp.png
│ │ ├── ic_local_hospital_black_24dp.png
│ │ └── ic_today_black_24dp.png
│ │ ├── drawable
│ │ ├── avatar_default.png
│ │ ├── blue_background.jpg
│ │ ├── ic_menu_camera.xml
│ │ ├── ic_menu_gallery.xml
│ │ ├── ic_menu_manage.xml
│ │ ├── ic_menu_send.xml
│ │ ├── ic_menu_share.xml
│ │ ├── ic_menu_slideshow.xml
│ │ ├── nav_header.jpeg
│ │ ├── plussign.jpg
│ │ ├── pressed_color.xml
│ │ ├── round_button.xml
│ │ ├── shadow.xml
│ │ ├── side_nav_bar.xml
│ │ ├── spinner.xml
│ │ └── yoga.jpg
│ │ ├── layout
│ │ ├── activity_about.xml
│ │ ├── activity_ailment_detail.xml
│ │ ├── activity_ailments_list.xml
│ │ ├── activity_appointment_form.xml
│ │ ├── activity_appointments.xml
│ │ ├── activity_base.xml
│ │ ├── activity_create_account.xml
│ │ ├── activity_doctor.xml
│ │ ├── activity_doctor_detail.xml
│ │ ├── activity_find_doctor.xml
│ │ ├── activity_health.xml
│ │ ├── activity_login.xml
│ │ ├── activity_main.xml
│ │ ├── activity_navigation_drawer.xml
│ │ ├── ailment_list_item.xml
│ │ ├── app_bar_navigation_drawer.xml
│ │ ├── content_navigation_drawer.xml
│ │ ├── doctor_list_item.xml
│ │ ├── fragment_ailment_detail.xml
│ │ ├── fragment_doctor_detail.xml
│ │ └── nav_header_navigation_drawer.xml
│ │ ├── menu
│ │ ├── activity_navigation_drawer_drawer.xml
│ │ ├── menu_main.xml
│ │ └── navigation_drawer.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── epicodus
│ └── checkup
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots.jpg
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | check-up-android
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # CheckUp! Android App
4 | ## By Ashley Maceli - Epicodus 2016
5 |
6 | ## Description
7 |
8 | CheckUp is a new kind of health tracking app. Still in development as an ongoing independent project for the Android course at Epicodus. Keep track of your important health questions and concerns. Add those to your scheduled appointments and refer to it during your appointment. It is so easy to forget a question you wanted to ask your Doctor and it's too often that you only remember after the appointment! Check Up wants to help keep these records organized and available for you to make the most of your appointments! CheckUp is meant to be used as a way to track these ailments, appointments, doctor's notes and smart reminders through your life to make you the healthiest and happiest you can be!
9 |
10 | ## Current Features
11 | * Create new accounts, log in and out.
12 | * Search for doctors by location and specialty. Search parameters added to saved preferences.
13 | * Doctors may be scrolled through either in the ListView or through details pages.
14 | * Add ailments with details. Ailments may be scrolled through either in the ListView or through details pages.
15 | * Navigation Drawer for quick navigation to most important activities.
16 |
17 | ## Future Features
18 |
19 | * Add time stamps, severity rating and updatability to ailments.
20 | * Adding appointments with "smart" reminders.
21 | * Adding doctors and ailments to appointments.
22 |
23 | ## Known Bugs
24 |
25 | Project still in development. No major bugs at this time.
26 |
27 | ## Prerequisites
28 |
29 | You will need the following things properly installed on your computer.
30 |
31 | * Android Studio
32 |
33 | ## Running / Development
34 |
35 | * `git clone https://github.com/AshleyRayMaceli/check-up-android` this repository
36 | * change into the new directory
37 | * open in Android Studio
38 | * boot up emulator with the Nexus 6P model
39 | * press the 'run' button (looks like a green play button)
40 |
41 | ## Technologies Used
42 |
43 | Java, Android Studio, Google Firebase, BetterDoctor API
44 |
45 | ### Running Tests
46 |
47 | No tests at this time.
48 |
49 | ### License
50 |
51 | The MIT License (MIT)
52 |
53 | Copyright (c) 2016 - Ashley Maceli
54 |
55 | Permission is hereby granted, free of charge, to any person obtaining a copy
56 | of this software and associated documentation files (the "Software"), to deal
57 | in the Software without restriction, including without limitation the rights
58 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
59 | copies of the Software, and to permit persons to whom the Software is
60 | furnished to do so, subject to the following conditions:
61 |
62 | The above copyright notice and this permission notice shall be included in all
63 | copies or substantial portions of the Software.
64 |
65 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
66 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
67 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
68 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
69 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
70 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
71 | SOFTWARE.
72 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.neenbedankt.android-apt'
3 |
4 | android {
5 | compileSdkVersion 23
6 | buildToolsVersion "23.0.3"
7 |
8 | defaultConfig {
9 | applicationId "com.epicodus.checkup"
10 | minSdkVersion 21
11 | targetSdkVersion 23
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 |
16 | packagingOptions {
17 | exclude 'META-INF/DEPENDENCIES.txt'
18 | exclude 'META-INF/DEPENDENCIES'
19 | exclude 'META-INF/dependencies.txt'
20 | exclude 'META-INF/LICENSE.txt'
21 | exclude 'META-INF/LICENSE'
22 | exclude 'META-INF/license.txt'
23 | exclude 'META-INF/LGPL2.1'
24 | exclude 'META-INF/NOTICE.txt'
25 | exclude 'META-INF/NOTICE'
26 | exclude 'META-INF/notice.txt'
27 | }
28 |
29 | buildTypes {
30 | release {
31 | minifyEnabled false
32 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
33 | }
34 | }
35 | buildTypes.each {
36 | it.buildConfigField 'String', 'BETTER_DOCTOR_CONSUMER_KEY', BetterDoctorConsumerKey
37 | }
38 | }
39 |
40 | dependencies {
41 | compile fileTree(dir: 'libs', include: ['*.jar'])
42 | testCompile 'junit:junit:4.12'
43 | apt 'org.parceler:parceler:1.1.1'
44 | compile 'com.android.support:appcompat-v7:23.4.0'
45 | compile 'com.jakewharton:butterknife:7.0.1'
46 | compile 'com.squareup.okhttp3:okhttp:3.2.0'
47 | compile 'se.akerfeldt:okhttp-signpost:1.1.0'
48 | compile 'com.android.support:recyclerview-v7:23.4.0'
49 | compile 'com.android.support:support-v4:23.4.0'
50 | compile 'org.parceler:parceler-api:1.1.1'
51 | compile 'com.google.firebase:firebase-database:9.0.2'
52 | compile 'com.firebaseui:firebase-ui-database:0.4.1'
53 | compile 'com.google.firebase:firebase-auth:9.0.2'
54 | compile 'com.android.support:design:23.4.0'
55 | compile 'de.hdodenhof:circleimageview:2.1.0'
56 | }
57 |
58 | apply plugin: 'com.google.gms.google-services'
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "512379865667",
4 | "firebase_url": "https://check-up-android.firebaseio.com",
5 | "project_id": "check-up-android",
6 | "storage_bucket": "check-up-android.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:512379865667:android:3249acb0d3e22ca9",
12 | "android_client_info": {
13 | "package_name": "com.epicodus.checkup"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "512379865667-rdtmbeh9cir7aatgfrsaur9i7f924b5a.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.epicodus.checkup",
22 | "certificate_hash": "0A7CA5C5BA6568AC10A2AA429CD4DD7CA6412298"
23 | }
24 | },
25 | {
26 | "client_id": "512379865667-elcepsinfa7t7sgt2kf5i6olg6u1erdm.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyBTZZx3klo14dHLml0jcjt8rZfeOMocCI8"
33 | }
34 | ],
35 | "services": {
36 | "analytics_service": {
37 | "status": 1
38 | },
39 | "appinvite_service": {
40 | "status": 2,
41 | "other_platform_oauth_client": [
42 | {
43 | "client_id": "512379865667-elcepsinfa7t7sgt2kf5i6olg6u1erdm.apps.googleusercontent.com",
44 | "client_type": 3
45 | }
46 | ]
47 | },
48 | "ads_service": {
49 | "status": 2
50 | }
51 | }
52 | }
53 | ],
54 | "configuration_version": "1"
55 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/Shared/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/epicodus/checkup/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
30 |
31 |
32 |
35 |
36 |
37 |
40 |
41 |
42 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
62 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/assets/fonts/Questrial-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/assets/fonts/Questrial-Regular.otf
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/Constants.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup;
2 |
3 | public class Constants {
4 | public static final String BETTER_DOCTOR_CONSUMER_KEY = BuildConfig.BETTER_DOCTOR_CONSUMER_KEY;
5 | public static final String BETTER_DOCTOR_BASE_URL = "https://api.betterdoctor.com/2016-03-01/doctors?";
6 | public static final String BETTER_DOCTOR_SPECIALTY_QUERY_PARAMETER = "specialty_uid";
7 | public static final String BETTER_DOCTOR_LOCATION_QUERY_PARAMETER = "location";
8 | public static final String API_KEY_QUERY_PARAMETER = "user_key";
9 | public static final String FIREBASE_CHILD_DOCTORS = "doctors";
10 | public static final String FIREBASE_CHILD_AILMENTS = "ailments";
11 | public static final String PREFERENCES_SPECIALTY_KEY = "specialtySpinnerSelection";
12 | public static final String PREFERENCES_CITY_KEY = "city";
13 | public static final String PREFERENCES_STATE_KEY = "stateSpinnerSelection";
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/adapters/AilmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.adapters;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 |
7 | import com.epicodus.checkup.models.Ailment;
8 | import com.epicodus.checkup.ui.AilmentDetailFragment;
9 |
10 | import java.util.ArrayList;
11 |
12 | public class AilmentPagerAdapter extends FragmentPagerAdapter {
13 | private ArrayList mAilments;
14 |
15 | public AilmentPagerAdapter(FragmentManager fm, ArrayList ailments) {
16 | super(fm);
17 | mAilments = ailments;
18 | }
19 |
20 | @Override
21 | public Fragment getItem(int position) {
22 | return AilmentDetailFragment.newInstance(mAilments.get(position));
23 | }
24 |
25 | @Override
26 | public int getCount() {
27 | return mAilments.size();
28 | }
29 |
30 | @Override
31 | public CharSequence getPageTitle(int position) {
32 | return mAilments.get(position).getTitle();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/adapters/AllAilmentsListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.adapters;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import com.epicodus.checkup.R;
12 | import com.epicodus.checkup.models.Ailment;
13 | import com.epicodus.checkup.ui.AilmentDetailActivity;
14 |
15 | import org.parceler.Parcels;
16 |
17 | import java.util.ArrayList;
18 |
19 | import butterknife.Bind;
20 | import butterknife.ButterKnife;
21 |
22 | public class AllAilmentsListAdapter extends RecyclerView.Adapter {
23 | private ArrayList mAllAilments = new ArrayList<>();
24 | private Context mContext;
25 |
26 | public AllAilmentsListAdapter(Context context, ArrayList allAilments) {
27 | mContext = context;
28 | mAllAilments = allAilments;
29 | }
30 |
31 | @Override
32 | public AllAilmentsListAdapter.AllAilmentsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
33 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.ailment_list_item, parent, false);
34 | AllAilmentsViewHolder viewHolder = new AllAilmentsViewHolder(view);
35 | return viewHolder;
36 | }
37 |
38 | @Override
39 | public void onBindViewHolder(AllAilmentsListAdapter.AllAilmentsViewHolder holder, int position) {
40 | holder.bindAllAilments(mAllAilments.get(position));
41 | }
42 |
43 | @Override
44 | public int getItemCount() {
45 | return mAllAilments.size();
46 | }
47 |
48 | public class AllAilmentsViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
49 | @Bind(R.id.ailmentTitleTextView) TextView mAilmentTitleTextView;
50 |
51 | private Context mContext;
52 |
53 | public AllAilmentsViewHolder(View itemView) {
54 | super(itemView);
55 | ButterKnife.bind(this, itemView);
56 | mContext = itemView.getContext();
57 | itemView.setOnClickListener(this);
58 | }
59 |
60 | @Override
61 | public void onClick(View v) {
62 | int itemPosition = getLayoutPosition();
63 | Intent intent = new Intent(mContext, AilmentDetailActivity.class);
64 | intent.putExtra("position", itemPosition);
65 | intent.putExtra("ailments", Parcels.wrap(mAllAilments));
66 | mContext.startActivity(intent);
67 | }
68 |
69 | public void bindAllAilments(Ailment ailment) {
70 | mAilmentTitleTextView.setText(ailment.getTitle());
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/adapters/DoctorListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.adapters;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import com.epicodus.checkup.R;
13 | import com.epicodus.checkup.models.Doctor;
14 | import com.epicodus.checkup.ui.DoctorDetailActivity;
15 |
16 | import org.parceler.Parcels;
17 |
18 | import java.util.ArrayList;
19 |
20 | import butterknife.Bind;
21 | import butterknife.ButterKnife;
22 |
23 | public class DoctorListAdapter extends RecyclerView.Adapter {
24 | private ArrayList mDoctors = new ArrayList<>();
25 | private Context mContext;
26 |
27 | public DoctorListAdapter(Context context, ArrayList doctors) {
28 | mContext = context;
29 | mDoctors = doctors;
30 | }
31 |
32 | @Override
33 | public DoctorListAdapter.DoctorViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
34 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.doctor_list_item, parent, false);
35 | DoctorViewHolder viewHolder = new DoctorViewHolder(view);
36 | return viewHolder;
37 | }
38 |
39 | @Override
40 | public void onBindViewHolder(DoctorListAdapter.DoctorViewHolder holder, int position) {
41 | holder.bindDoctor(mDoctors.get(position));
42 | }
43 |
44 | @Override
45 | public int getItemCount() {
46 | return mDoctors.size();
47 | }
48 |
49 | public class DoctorViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
50 | @Bind(R.id.doctorImageView) ImageView mDoctorImageView;
51 | @Bind(R.id.doctorNameTextView) TextView mDoctorNameTextView;
52 | @Bind(R.id.specialtyTextView) TextView mSpecialtyTextView;
53 |
54 | private Context mContext;
55 |
56 | public DoctorViewHolder(View itemView) {
57 | super(itemView);
58 | ButterKnife.bind(this, itemView);
59 | mContext = itemView.getContext();
60 | itemView.setOnClickListener(this);
61 | }
62 |
63 | @Override
64 | public void onClick(View v) {
65 | int itemPosition = getLayoutPosition();
66 | Intent intent = new Intent(mContext, DoctorDetailActivity.class);
67 | intent.putExtra("position", itemPosition + "");
68 | intent.putExtra("doctors", Parcels.wrap(mDoctors));
69 | mContext.startActivity(intent);
70 | }
71 |
72 | public void bindDoctor(Doctor doctor) {
73 | mDoctorNameTextView.setText(doctor.getName());
74 | mSpecialtyTextView.setText(doctor.getSpecialty());
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/adapters/DoctorPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.adapters;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 |
7 | import com.epicodus.checkup.models.Doctor;
8 | import com.epicodus.checkup.ui.DoctorDetailFragment;
9 |
10 | import java.util.ArrayList;
11 |
12 | public class DoctorPagerAdapter extends FragmentPagerAdapter {
13 | private ArrayList mDoctors;
14 |
15 | public DoctorPagerAdapter(FragmentManager fm, ArrayList doctors) {
16 | super(fm);
17 | mDoctors = doctors;
18 | }
19 |
20 | @Override
21 | public Fragment getItem(int position) {
22 | return DoctorDetailFragment.newInstance(mDoctors.get(position));
23 | }
24 |
25 | @Override
26 | public int getCount() {
27 | return mDoctors.size();
28 | }
29 |
30 | @Override
31 | public CharSequence getPageTitle(int position) {
32 | return mDoctors.get(position).getName();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/adapters/FirebaseDoctorViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.adapters;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.View;
7 | import android.widget.TextView;
8 |
9 | import com.epicodus.checkup.Constants;
10 | import com.epicodus.checkup.R;
11 | import com.epicodus.checkup.models.Doctor;
12 | import com.epicodus.checkup.ui.DoctorDetailActivity;
13 | import com.google.firebase.auth.FirebaseAuth;
14 | import com.google.firebase.auth.FirebaseUser;
15 | import com.google.firebase.database.DataSnapshot;
16 | import com.google.firebase.database.DatabaseError;
17 | import com.google.firebase.database.DatabaseReference;
18 | import com.google.firebase.database.FirebaseDatabase;
19 | import com.google.firebase.database.ValueEventListener;
20 |
21 | import org.parceler.Parcels;
22 |
23 | import java.util.ArrayList;
24 |
25 | public class FirebaseDoctorViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
26 |
27 | View mView;
28 | Context mContext;
29 |
30 | public FirebaseDoctorViewHolder(View itemView) {
31 | super(itemView);
32 | mView = itemView;
33 | mContext = itemView.getContext();
34 | itemView.setOnClickListener(this);
35 | }
36 |
37 | public void bindDoctor(Doctor doctor) {
38 | TextView doctorNameTextView = (TextView) mView.findViewById(R.id.doctorNameTextView);
39 | TextView specialtyTextView = (TextView) mView.findViewById(R.id.specialtyTextView);
40 |
41 | doctorNameTextView.setText(doctor.getName());
42 | specialtyTextView.setText(doctor.getSpecialty());
43 | }
44 |
45 | @Override
46 | public void onClick(View view) {
47 | final ArrayList doctors = new ArrayList<>();
48 |
49 | FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
50 | String uid = user.getUid();
51 |
52 | DatabaseReference ref = FirebaseDatabase
53 | .getInstance()
54 | .getReference(Constants.FIREBASE_CHILD_DOCTORS)
55 | .child(uid);
56 |
57 | ref.addListenerForSingleValueEvent(new ValueEventListener() {
58 | @Override
59 | public void onDataChange(DataSnapshot dataSnapshot) {
60 | for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
61 | doctors.add(snapshot.getValue(Doctor.class));
62 | }
63 |
64 | int itemPosition = getLayoutPosition();
65 |
66 | Intent intent = new Intent(mContext, DoctorDetailActivity.class);
67 | intent.putExtra("position", itemPosition + "");
68 | intent.putExtra("doctors", Parcels.wrap(doctors));
69 |
70 |
71 | mContext.startActivity(intent);
72 | }
73 |
74 | @Override
75 | public void onCancelled(DatabaseError databaseError) {
76 |
77 | }
78 | });
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/models/Ailment.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.models;
2 |
3 | import org.parceler.Parcel;
4 | import java.util.Calendar;
5 |
6 | @Parcel
7 | public class Ailment {
8 | String title;
9 | String notes;
10 | String date;
11 | private String pushId;
12 |
13 | public Ailment() {}
14 |
15 | public Ailment(String title, String notes) {
16 | this.title = title;
17 | this.notes = notes;
18 |
19 | Calendar cal = Calendar.getInstance();
20 | String year = cal.get(Calendar.YEAR) + "";
21 | String month = (cal.get(Calendar.MONTH) + 1) + "";
22 | String day = cal.get(Calendar.DAY_OF_MONTH) + "";
23 |
24 | this.date = month + " / " + day + " / " + year;
25 | }
26 |
27 | public String getTitle() {
28 | return title;
29 | }
30 |
31 | public String getNotes() {
32 | return notes;
33 | }
34 |
35 | public String getDate() { return date; }
36 |
37 | public String getPushId() {
38 | return pushId;
39 | }
40 |
41 | public void setPushId(String pushId) {
42 | this.pushId = pushId;
43 | }
44 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/models/Doctor.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.models;
2 |
3 | import org.parceler.Parcel;
4 |
5 | import java.lang.reflect.Array;
6 | import java.util.ArrayList;
7 |
8 | @Parcel
9 | public class Doctor {
10 | String name;
11 | String specialty;
12 | ArrayList phone = new ArrayList<>();
13 | double latitude;
14 | double longitude;
15 | String street;
16 | String street2;
17 | String city;
18 | String state;
19 | String zip;
20 | String bio;
21 | private String pushId;
22 |
23 | public Doctor() {}
24 |
25 | public Doctor(String name, String specialty, ArrayList phone, double latitude, double longitude, String street, String street2, String city, String state, String zip, String bio) {
26 | this.name = name;
27 | this.specialty = specialty;
28 | this.phone = phone;
29 | this.latitude = latitude;
30 | this.longitude = longitude;
31 | this.street = street;
32 | this.street2 = street2;
33 | this.city = city;
34 | this.state = state;
35 | this.zip = zip;
36 | this.bio = bio;
37 | }
38 |
39 | public String getName() {
40 | return name;
41 | }
42 |
43 | public String getSpecialty() {
44 | return specialty;
45 | }
46 |
47 | public ArrayList getPhone() {
48 | return phone;
49 | }
50 |
51 | public double getLatitude() {
52 | return latitude;
53 | }
54 |
55 | public double getLongitude() {
56 | return longitude;
57 | }
58 |
59 | public String getStreet() { return street; }
60 |
61 | public String getStreet2() { return street2; }
62 |
63 | public String getCity() { return city; }
64 |
65 | public String getState() { return state; }
66 |
67 | public String getZip() { return zip; }
68 |
69 | public String getBio() {
70 | return bio;
71 | }
72 |
73 | public String getPushId() {
74 | return pushId;
75 | }
76 |
77 | public void setPushId(String pushId) {
78 | this.pushId = pushId;
79 | }
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/services/BetterDoctorService.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.services;
2 |
3 | import android.telephony.PhoneNumberUtils;
4 | import android.util.Log;
5 |
6 | import com.epicodus.checkup.Constants;
7 | import com.epicodus.checkup.models.Doctor;
8 |
9 | import org.json.JSONArray;
10 | import org.json.JSONException;
11 | import org.json.JSONObject;
12 |
13 | import java.io.IOException;
14 | import java.lang.reflect.Array;
15 | import java.util.ArrayList;
16 | import java.util.Locale;
17 |
18 | import okhttp3.Call;
19 | import okhttp3.Callback;
20 | import okhttp3.HttpUrl;
21 | import okhttp3.OkHttpClient;
22 | import okhttp3.Request;
23 | import okhttp3.Response;
24 |
25 | public class BetterDoctorService {
26 |
27 | public static void findDoctorsByLocationAndSpecialty(String specialty, String city, String state, Callback callback) {
28 | OkHttpClient client = new OkHttpClient.Builder()
29 | .build();
30 |
31 | String locationSlug = state + "-" + city;
32 |
33 | HttpUrl.Builder urlBuilder = HttpUrl.parse(Constants.BETTER_DOCTOR_BASE_URL).newBuilder();
34 | urlBuilder.addQueryParameter(Constants.BETTER_DOCTOR_SPECIALTY_QUERY_PARAMETER, specialty);
35 | urlBuilder.addQueryParameter(Constants.BETTER_DOCTOR_LOCATION_QUERY_PARAMETER, locationSlug);
36 | urlBuilder.addQueryParameter(Constants.API_KEY_QUERY_PARAMETER, Constants.BETTER_DOCTOR_CONSUMER_KEY);
37 | String url = urlBuilder.build().toString();
38 |
39 | Request request = new Request.Builder()
40 | .url(url)
41 | .build();
42 |
43 | Log.d("URL", request + "");
44 |
45 | Call call = client.newCall(request);
46 | call.enqueue(callback);
47 | }
48 |
49 | public ArrayList processResults(Response response) {
50 | ArrayList doctors = new ArrayList<>();
51 |
52 | try {
53 | String jsonData = response.body().string();
54 | if (response.isSuccessful()) {
55 | JSONObject betterDoctorJSON = new JSONObject(jsonData);
56 | JSONArray resultsJSON = betterDoctorJSON.getJSONArray("data");
57 | for (int i = 0; i < resultsJSON.length(); i++) {
58 | JSONObject doctorJSON = resultsJSON.getJSONObject(i);
59 | String name = doctorJSON.getJSONArray("practices").getJSONObject(0).getString("name");
60 | String specialty = doctorJSON.getJSONArray("specialties").getJSONObject(0).getString("actor");
61 |
62 | ArrayList phone = new ArrayList<>();
63 | JSONArray phoneJSON = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONArray("phones");
64 | for (int y = 0; y < phoneJSON.length(); y++) {
65 | String number = phoneJSON.getJSONObject(y).getString("number");
66 | String formattedNumber = PhoneNumberUtils.formatNumber(number, Locale.getDefault().getCountry());
67 | phone.add(formattedNumber);
68 | }
69 |
70 | double latitude = doctorJSON.getJSONArray("practices").getJSONObject(0).getDouble("lat");
71 | double longitude = doctorJSON.getJSONArray("practices").getJSONObject(0).getDouble("lon");
72 | String street = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONObject("visit_address").getString("street");
73 |
74 | String street2;
75 | try {
76 | street2 = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONObject("visit_address").getString("street2");
77 | } catch (JSONException e) {
78 | street2 = "";
79 | }
80 |
81 | String city = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONObject("visit_address").getString("city");
82 | String state = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONObject("visit_address").getString("state");
83 | String zip = doctorJSON.getJSONArray("practices").getJSONObject(0).getJSONObject("visit_address").getString("zip");
84 | String bio = doctorJSON.getJSONObject("profile").getString("bio");
85 |
86 | Doctor doctor = new Doctor(name, specialty, phone, latitude, longitude, street, street2, city, state, zip, bio);
87 | doctors.add(doctor);
88 | }
89 | }
90 | } catch (IOException e) {
91 | e.printStackTrace();
92 | } catch (JSONException e) {
93 | e.printStackTrace();
94 | }
95 | return doctors;
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.graphics.Typeface;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.widget.TextView;
7 |
8 | import com.epicodus.checkup.R;
9 |
10 | import org.w3c.dom.Text;
11 |
12 | import butterknife.Bind;
13 | import butterknife.ButterKnife;
14 |
15 | public class AboutActivity extends BaseActivity {
16 | @Bind(R.id.aboutTitle) TextView mAboutTitle;
17 | @Bind(R.id.aboutTextView) TextView mAboutTextView;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_about);
23 | super.onCreateDrawer();
24 | ButterKnife.bind(this);
25 |
26 | Typeface questrialFont = Typeface.createFromAsset(getAssets(), "fonts/Questrial-Regular.otf");
27 | mAboutTitle.setTypeface(questrialFont);
28 | mAboutTextView.setTypeface(questrialFont);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AilmentDetailActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.support.v4.view.ViewPager;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 |
7 | import com.epicodus.checkup.R;
8 | import com.epicodus.checkup.adapters.AilmentPagerAdapter;
9 | import com.epicodus.checkup.models.Ailment;
10 |
11 | import org.parceler.Parcels;
12 |
13 | import java.util.ArrayList;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | public class AilmentDetailActivity extends BaseActivity {
19 | @Bind(R.id.viewPager) ViewPager mViewPager;
20 | private AilmentPagerAdapter adapterViewPager;
21 | ArrayList mAilments = new ArrayList<>();
22 |
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_ailment_detail);
28 | super.onCreateDrawer();
29 | ButterKnife.bind(this);
30 |
31 | mAilments = Parcels.unwrap(getIntent().getParcelableExtra("ailments"));
32 | int startingPosition = getIntent().getIntExtra("position", 0);
33 |
34 | adapterViewPager = new AilmentPagerAdapter(getSupportFragmentManager(), mAilments);
35 | mViewPager.setAdapter(adapterViewPager);
36 | mViewPager.setCurrentItem(startingPosition);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AilmentDetailFragment.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 |
4 | import android.graphics.Typeface;
5 | import android.os.Bundle;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.TextView;
11 |
12 | import com.epicodus.checkup.R;
13 | import com.epicodus.checkup.models.Ailment;
14 |
15 | import org.parceler.Parcels;
16 |
17 | import butterknife.Bind;
18 | import butterknife.ButterKnife;
19 |
20 | public class AilmentDetailFragment extends Fragment {
21 | @Bind(R.id.ailmentTitleTextView) TextView mAilmentTitleTextView;
22 | @Bind(R.id.ailmentNotesTextView) TextView mAilmentNotesTextView;
23 | @Bind(R.id.dateTextView) TextView mDateTextView;
24 | @Bind(R.id.firstNoticedTextView) TextView mFirstNoticedTextView;
25 |
26 | private Ailment mAilment;
27 |
28 | public static AilmentDetailFragment newInstance(Ailment ailment) {
29 | AilmentDetailFragment ailmentDetailFragment = new AilmentDetailFragment();
30 | Bundle args = new Bundle();
31 | args.putParcelable("ailment", Parcels.wrap(ailment));
32 | ailmentDetailFragment.setArguments(args);
33 | return ailmentDetailFragment;
34 | }
35 |
36 | @Override
37 | public void onCreate(Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | mAilment = Parcels.unwrap(getArguments().getParcelable("ailment"));
40 | }
41 |
42 | @Override
43 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
44 | Bundle savedInstanceState) {
45 | View view = inflater.inflate(R.layout.fragment_ailment_detail, container, false);
46 | ButterKnife.bind(this, view);
47 |
48 | mAilmentTitleTextView.setText(mAilment.getTitle());
49 | mAilmentNotesTextView.setText(mAilment.getNotes());
50 | mDateTextView.setText(mAilment.getDate());
51 |
52 | Typeface questrialFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Questrial-Regular.otf");
53 | mAilmentTitleTextView.setTypeface(questrialFont);
54 | mAilmentNotesTextView.setTypeface(questrialFont);
55 | mDateTextView.setTypeface(questrialFont);
56 | mFirstNoticedTextView.setTypeface(questrialFont);
57 |
58 | return view;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AilmentsListActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.support.v7.widget.LinearLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.util.Log;
8 | import android.view.View;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import com.epicodus.checkup.Constants;
13 | import com.epicodus.checkup.R;
14 | import com.epicodus.checkup.adapters.AllAilmentsListAdapter;
15 | import com.epicodus.checkup.models.Ailment;
16 | import com.firebase.ui.database.FirebaseRecyclerAdapter;
17 | import com.google.firebase.auth.FirebaseAuth;
18 | import com.google.firebase.auth.FirebaseUser;
19 | import com.google.firebase.database.DataSnapshot;
20 | import com.google.firebase.database.DatabaseError;
21 | import com.google.firebase.database.DatabaseReference;
22 | import com.google.firebase.database.FirebaseDatabase;
23 | import com.google.firebase.database.ValueEventListener;
24 |
25 | import java.util.ArrayList;
26 |
27 | import butterknife.Bind;
28 | import butterknife.ButterKnife;
29 |
30 | public class AilmentsListActivity extends BaseActivity {
31 | private DatabaseReference mAilmentReference;
32 | private ArrayList mAilments = new ArrayList<>();
33 | private AllAilmentsListAdapter mAdapter;
34 |
35 | @Bind(R.id.recyclerView) RecyclerView mRecyclerView;
36 | @Bind(R.id.noResultsImageView) ImageView mNoResultsImageView;
37 | @Bind(R.id.noResultsTextView) TextView mNoResultsTextView;
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | setContentView(R.layout.activity_ailments_list);
43 | super.onCreateDrawer();
44 | ButterKnife.bind(this);
45 |
46 | FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
47 | String uid = user.getUid();
48 |
49 | mAilmentReference = FirebaseDatabase
50 | .getInstance()
51 | .getReference(Constants.FIREBASE_CHILD_AILMENTS)
52 | .child(uid);
53 |
54 | mAilmentReference.addListenerForSingleValueEvent(new ValueEventListener() {
55 | @Override
56 | public void onDataChange(DataSnapshot snapshot) {
57 | for (DataSnapshot ailmentsSnapshot : snapshot.getChildren()) {
58 | Ailment ailment = ailmentsSnapshot.getValue(Ailment.class);
59 | mAilments.add(ailment);
60 | Log.d("Ailment:", ailment + "");
61 | }
62 |
63 | if (mAilments.isEmpty()) {
64 | mNoResultsImageView.setVisibility(View.VISIBLE);
65 | mNoResultsTextView.setVisibility(View.VISIBLE);
66 | }
67 |
68 | setUpRecyclerAdapter();
69 | }
70 |
71 | @Override
72 | public void onCancelled(DatabaseError databaseError) {
73 |
74 | }
75 | });
76 | }
77 |
78 | private void setUpRecyclerAdapter() {
79 | mAdapter = new AllAilmentsListAdapter(getApplicationContext(), mAilments);
80 | mRecyclerView.setAdapter(mAdapter);
81 | RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(AilmentsListActivity.this);
82 | mRecyclerView.setLayoutManager(layoutManager);
83 | mRecyclerView.setHasFixedSize(true);
84 | }
85 |
86 | @Override
87 | protected void onDestroy() {
88 | super.onDestroy();
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AppointmentFormActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | import com.epicodus.checkup.R;
7 |
8 | public class AppointmentFormActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_appointment_form);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/AppointmentsActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarDrawerToggle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 | import android.widget.ArrayAdapter;
10 | import android.widget.Button;
11 | import android.widget.ListView;
12 |
13 | import com.epicodus.checkup.R;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | public class AppointmentsActivity extends BaseActivity implements View.OnClickListener {
19 | @Bind(R.id.appointmentsListView) ListView mAppointmentsListView;
20 | @Bind(R.id.newAppointmentButton) Button mNewAppointmentButton;
21 | @Bind(R.id.findDoctorButton) Button mFindDoctorButton;
22 | @Bind(R.id.savedDoctorsButton) Button mSavedDoctorsButton;
23 |
24 | private String[] appointments = new String[] {"Doctor A - Jan 1st 2017", "Doctor B - Feb 5th 2017", "Doctor C - Feb 19th 2017", "Doctor D - March 1st 2017"};
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_appointments);
30 | super.onCreateDrawer();
31 |
32 | ButterKnife.bind(this);
33 | ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, appointments);
34 | mAppointmentsListView.setAdapter(adapter);
35 | mNewAppointmentButton.setOnClickListener(this);
36 | mFindDoctorButton.setOnClickListener(this);
37 | mSavedDoctorsButton.setOnClickListener(this);
38 | }
39 |
40 | @Override
41 | public void onClick(View v) {
42 | if(v == mNewAppointmentButton) {
43 | Intent intent = new Intent(AppointmentsActivity.this, AppointmentFormActivity.class);
44 | startActivity(intent);
45 | }
46 | if (v == mFindDoctorButton) {
47 | Intent intent = new Intent(AppointmentsActivity.this, FindDoctorActivity.class);
48 | startActivity(intent);
49 | }
50 | if (v == mSavedDoctorsButton) {
51 | Intent intent = new Intent(AppointmentsActivity.this, SavedDoctorListActivity.class);
52 | startActivity(intent);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.content.res.Configuration;
6 | import android.graphics.Typeface;
7 | import android.support.annotation.NonNull;
8 | import android.support.design.widget.NavigationView;
9 | import android.support.v4.view.GravityCompat;
10 | import android.support.v4.widget.DrawerLayout;
11 | import android.support.v7.app.ActionBarDrawerToggle;
12 | import android.support.v7.app.AppCompatActivity;
13 | import android.os.Bundle;
14 | import android.util.Log;
15 | import android.view.MenuItem;
16 | import android.view.View;
17 | import android.widget.ListView;
18 |
19 | import com.epicodus.checkup.R;
20 | import com.google.firebase.auth.FirebaseAuth;
21 | import com.google.firebase.auth.FirebaseUser;
22 |
23 | import java.util.Map;
24 |
25 | import butterknife.ButterKnife;
26 |
27 | public class BaseActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
28 |
29 | ActionBarDrawerToggle toggle;
30 |
31 | protected void onCreateDrawer() {
32 | DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
33 | toggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.open, R.string.close);
34 | drawerLayout.addDrawerListener(toggle);
35 | toggle.syncState();
36 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
37 | NavigationView navigationView = (NavigationView) findViewById(R.id.navigationView);
38 | navigationView.setNavigationItemSelectedListener(this);
39 | }
40 |
41 | @Override
42 | public boolean onOptionsItemSelected(MenuItem item) {
43 | if (toggle.onOptionsItemSelected(item)) {
44 | return true;
45 | }
46 | return super.onOptionsItemSelected(item);
47 | }
48 |
49 | @Override
50 | public boolean onNavigationItemSelected(MenuItem item) {
51 |
52 | switch (item.getItemId()) {
53 |
54 | case R.id.nav_home:
55 | Intent homeIntent = new Intent(getApplicationContext(), MainActivity.class);
56 | startActivity(homeIntent);
57 | break;
58 |
59 | case R.id.nav_appointments:
60 | Intent appointmentIntent = new Intent(getApplicationContext(), AppointmentsActivity.class);
61 | startActivity(appointmentIntent);
62 | break;
63 |
64 | case R.id.nav_health:
65 | Intent healthIntent = new Intent(getApplicationContext(), AilmentsListActivity.class);
66 | startActivity(healthIntent);
67 | break;
68 |
69 | case R.id.nav_doctor:
70 | Intent findDoctorIntent = new Intent(getApplicationContext(), FindDoctorActivity.class);
71 | startActivity(findDoctorIntent);
72 | break;
73 |
74 | case R.id.nav_saved_doctors:
75 | Intent savedDoctorsIntent = new Intent(getApplicationContext(), SavedDoctorListActivity.class);
76 | startActivity(savedDoctorsIntent);
77 | break;
78 |
79 | case R.id.nav_about:
80 | Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class);
81 | startActivity(aboutIntent);
82 | break;
83 |
84 | case R.id.nav_share:
85 | //feature to be added later
86 | break;
87 |
88 | case R.id.nav_send:
89 | //feature to be added later
90 | break;
91 | }
92 |
93 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawerLayout);
94 | if(drawer.isDrawerOpen(GravityCompat.START))
95 | drawer.closeDrawer(GravityCompat.START);
96 |
97 | return false;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/CreateAccountActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.app.ProgressDialog;
4 | import android.content.Intent;
5 | import android.support.annotation.NonNull;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.util.Log;
9 | import android.view.View;
10 | import android.widget.Button;
11 | import android.widget.EditText;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.epicodus.checkup.R;
16 | import com.google.android.gms.tasks.OnCompleteListener;
17 | import com.google.android.gms.tasks.Task;
18 | import com.google.firebase.auth.AuthResult;
19 | import com.google.firebase.auth.FirebaseAuth;
20 | import com.google.firebase.auth.FirebaseUser;
21 | import com.google.firebase.auth.UserProfileChangeRequest;
22 |
23 | import butterknife.Bind;
24 | import butterknife.ButterKnife;
25 |
26 | public class CreateAccountActivity extends AppCompatActivity implements View.OnClickListener {
27 | public static final String TAG = CreateAccountActivity.class.getSimpleName();
28 | private String mName;
29 | private FirebaseAuth mAuth;
30 | private FirebaseAuth.AuthStateListener mAuthListener;
31 | private ProgressDialog mAuthProgressDialog;
32 |
33 | @Bind(R.id.createUserButton) Button mCreateUserButton;
34 | @Bind(R.id.nameEditText) EditText mNameEditText;
35 | @Bind(R.id.emailEditText) EditText mEmailEditText;
36 | @Bind(R.id.passwordEditText) EditText mPasswordEditText;
37 | @Bind(R.id.confirmPasswordEditText) EditText mConfirmPasswordEditText;
38 | @Bind(R.id.loginTextView) TextView mLoginTextView;
39 |
40 | @Override
41 | protected void onCreate(Bundle savedInstanceState) {
42 | super.onCreate(savedInstanceState);
43 | setContentView(R.layout.activity_create_account);
44 |
45 | ButterKnife.bind(this);
46 | mLoginTextView.setOnClickListener(this);
47 | mCreateUserButton.setOnClickListener(this);
48 |
49 | mAuth = FirebaseAuth.getInstance();
50 |
51 | createAuthStateListener();
52 | createAuthProgressDialog();
53 | }
54 |
55 | private void createAuthProgressDialog() {
56 | mAuthProgressDialog = new ProgressDialog(this);
57 | mAuthProgressDialog.setTitle("Loading...");
58 | mAuthProgressDialog.setMessage("Authenticating with Firebase...");
59 | mAuthProgressDialog.setCancelable(false);
60 | }
61 |
62 | @Override
63 | public void onClick(View view) {
64 |
65 | if (view == mLoginTextView) {
66 | Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);
67 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
68 | startActivity(intent);
69 | finish();
70 | }
71 |
72 | if (view == mCreateUserButton) {
73 | createNewUser();
74 | }
75 | }
76 |
77 | private void createNewUser() {
78 | mName = mNameEditText.getText().toString().trim();
79 | final String email = mEmailEditText.getText().toString().trim();
80 | String password = mPasswordEditText.getText().toString().trim();
81 | String confirmPassword = mConfirmPasswordEditText.getText().toString().trim();
82 |
83 | boolean validEmail = isValidEmail(email);
84 | boolean validName = isValidName(mName);
85 | boolean validPassword = isValidPassword(password, confirmPassword);
86 | if (!validEmail || !validName || !validPassword) return;
87 |
88 | mAuthProgressDialog.show();
89 |
90 | mAuth.createUserWithEmailAndPassword(email, password)
91 | .addOnCompleteListener(this, new OnCompleteListener() {
92 |
93 | @Override
94 | public void onComplete(@NonNull Task task) {
95 |
96 | mAuthProgressDialog.dismiss();
97 |
98 | if (task.isSuccessful()) {
99 | Log.d(TAG, "Authentication successful");
100 | createFirebaseUserProfile(task.getResult().getUser());
101 | } else {
102 | Toast.makeText(CreateAccountActivity.this, "Authentication failed.",
103 | Toast.LENGTH_SHORT).show();
104 | }
105 | }
106 | });
107 | }
108 |
109 | private void createFirebaseUserProfile(final FirebaseUser user) {
110 |
111 | UserProfileChangeRequest addProfileName = new UserProfileChangeRequest.Builder()
112 | .setDisplayName(mName)
113 | .build();
114 |
115 | user.updateProfile(addProfileName)
116 | .addOnCompleteListener(new OnCompleteListener() {
117 | @Override
118 | public void onComplete(@NonNull Task task) {
119 | if (task.isSuccessful()) {
120 | Log.d(TAG, user.getDisplayName());
121 | }
122 | }
123 | });
124 | }
125 |
126 | private void createAuthStateListener() {
127 | mAuthListener = new FirebaseAuth.AuthStateListener() {
128 |
129 | @Override
130 | public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
131 | final FirebaseUser user = firebaseAuth.getCurrentUser();
132 | if (user != null) {
133 | Intent intent = new Intent(CreateAccountActivity.this, MainActivity.class);
134 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
135 | startActivity(intent);
136 | finish();
137 | }
138 | }
139 | };
140 | }
141 |
142 | private boolean isValidEmail(String email) {
143 | boolean isGoodEmail =
144 | (email != null && android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches());
145 | if (!isGoodEmail) {
146 | mEmailEditText.setError("Please enter a valid email address");
147 | return false;
148 | }
149 | return isGoodEmail;
150 | }
151 |
152 | private boolean isValidName(String name) {
153 | if (name.equals("")) {
154 | mNameEditText.setError("Please enter your name");
155 | return false;
156 | }
157 | return true;
158 | }
159 |
160 | private boolean isValidPassword(String password, String confirmPassword) {
161 | if (password.length() < 6) {
162 | mPasswordEditText.setError("Please create a password containing at least 6 characters");
163 | return false;
164 | } else if (!password.equals(confirmPassword)) {
165 | mPasswordEditText.setError("Passwords do not match");
166 | return false;
167 | }
168 | return true;
169 | }
170 |
171 | @Override
172 | public void onStart() {
173 | super.onStart();
174 | mAuth.addAuthStateListener(mAuthListener);
175 | }
176 |
177 | @Override
178 | public void onStop() {
179 | super.onStop();
180 | if (mAuthListener != null) {
181 | mAuth.removeAuthStateListener(mAuthListener);
182 | }
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/DoctorDetailActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.support.v4.view.ViewPager;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 |
7 | import com.epicodus.checkup.R;
8 | import com.epicodus.checkup.adapters.DoctorPagerAdapter;
9 | import com.epicodus.checkup.models.Doctor;
10 |
11 | import org.parceler.Parcels;
12 |
13 | import java.util.ArrayList;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | public class DoctorDetailActivity extends BaseActivity {
19 | @Bind(R.id.viewPager)
20 | ViewPager mViewPager;
21 | private DoctorPagerAdapter adapterViewPager;
22 | ArrayList mDoctors = new ArrayList<>();
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_doctor_detail);
28 | super.onCreateDrawer();
29 | ButterKnife.bind(this);
30 |
31 | mDoctors = Parcels.unwrap(getIntent().getParcelableExtra("doctors"));
32 | int startingPosition = Integer.parseInt(getIntent().getStringExtra("position"));
33 |
34 | adapterViewPager = new DoctorPagerAdapter(getSupportFragmentManager(), mDoctors);
35 | mViewPager.setAdapter(adapterViewPager);
36 | mViewPager.setCurrentItem(startingPosition);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/DoctorDetailFragment.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 |
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.os.Bundle;
7 | import android.support.v4.app.Fragment;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.Button;
12 | import android.widget.ImageView;
13 | import android.widget.TextView;
14 | import android.widget.Toast;
15 |
16 | import com.epicodus.checkup.Constants;
17 | import com.epicodus.checkup.R;
18 | import com.epicodus.checkup.models.Doctor;
19 | import com.google.firebase.auth.FirebaseAuth;
20 | import com.google.firebase.auth.FirebaseUser;
21 | import com.google.firebase.database.DatabaseReference;
22 | import com.google.firebase.database.FirebaseDatabase;
23 |
24 | import org.parceler.Parcels;
25 |
26 | import butterknife.Bind;
27 | import butterknife.ButterKnife;
28 |
29 | public class DoctorDetailFragment extends Fragment implements View.OnClickListener {
30 | @Bind(R.id.doctorNameTextView) TextView mNameLabel;
31 | @Bind(R.id.specialtyTextView) TextView mSpecialtyLabel;
32 | @Bind(R.id.phoneTextView) TextView mPhoneLabel;
33 | @Bind(R.id.streetTextView) TextView mStreetLabel;
34 | @Bind(R.id.cityStateTextView) TextView mCityStateLabel;
35 | @Bind(R.id.bioTextView) TextView mBioLabel;
36 | @Bind(R.id.saveDoctorButton) Button mSaveDoctorButton;
37 |
38 | private Doctor mDoctor;
39 |
40 | public static DoctorDetailFragment newInstance (Doctor doctor) {
41 | DoctorDetailFragment doctorDetailFragment = new DoctorDetailFragment();
42 | Bundle args = new Bundle();
43 | args.putParcelable("doctor", Parcels.wrap(doctor));
44 | doctorDetailFragment.setArguments(args);
45 | return doctorDetailFragment;
46 | }
47 |
48 | @Override
49 | public void onCreate(Bundle savedInstanceState) {
50 | super.onCreate(savedInstanceState);
51 | mDoctor = Parcels.unwrap(getArguments().getParcelable("doctor"));
52 | }
53 |
54 | @Override
55 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
56 | Bundle savedInstanceState) {
57 | View view = inflater.inflate(R.layout.fragment_doctor_detail, container, false);
58 | ButterKnife.bind(this, view);
59 |
60 | mNameLabel.setText(mDoctor.getName());
61 | mSpecialtyLabel.setText(mDoctor.getSpecialty());
62 | mPhoneLabel.setText(android.text.TextUtils.join(", ", mDoctor.getPhone()));
63 | mStreetLabel.setText(mDoctor.getStreet() + " " + mDoctor.getStreet2());
64 | mCityStateLabel.setText(mDoctor.getCity() + ", " + mDoctor.getState() + ", " + mDoctor.getZip());
65 | mBioLabel.setText(mDoctor.getBio());
66 |
67 | mStreetLabel.setOnClickListener(this);
68 | mCityStateLabel.setOnClickListener(this);
69 | mSaveDoctorButton.setOnClickListener(this);
70 |
71 | return view;
72 | }
73 |
74 | @Override
75 | public void onClick(View v) {
76 | if (v == mStreetLabel || v == mCityStateLabel) {
77 | Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:" + mDoctor.getLatitude() + "," + mDoctor.getLongitude() + "?q=(" + mDoctor.getName() + ")"));
78 | startActivity(mapIntent);
79 | }
80 | if (v == mSaveDoctorButton) {
81 | FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
82 | String uid = user.getUid();
83 |
84 | DatabaseReference doctorRef = FirebaseDatabase
85 | .getInstance()
86 | .getReference(Constants.FIREBASE_CHILD_DOCTORS)
87 | .child(uid);
88 |
89 | DatabaseReference pushRef = doctorRef.push();
90 | String pushId = pushRef.getKey();
91 | mDoctor.setPushId(pushId);
92 | pushRef.setValue(mDoctor);
93 |
94 | Toast.makeText(getContext(), "Saved", Toast.LENGTH_SHORT).show();
95 | }
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/DoctorListActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.content.Intent;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.util.Log;
11 | import android.view.View;
12 | import android.widget.ImageView;
13 | import android.widget.TextView;
14 |
15 | import com.epicodus.checkup.Constants;
16 | import com.epicodus.checkup.R;
17 | import com.epicodus.checkup.adapters.DoctorListAdapter;
18 | import com.epicodus.checkup.models.Doctor;
19 | import com.epicodus.checkup.services.BetterDoctorService;
20 |
21 | import java.io.IOException;
22 | import java.util.ArrayList;
23 |
24 | import butterknife.Bind;
25 | import butterknife.ButterKnife;
26 | import okhttp3.Call;
27 | import okhttp3.Callback;
28 | import okhttp3.Response;
29 |
30 | public class DoctorListActivity extends BaseActivity {
31 | @Bind(R.id.recyclerView) RecyclerView mRecyclerView;
32 | @Bind(R.id.noResultsImageView) ImageView mNoResultsImageView;
33 | @Bind(R.id.noResultsTextView) TextView mNoResultsTextView;
34 |
35 | public ArrayList mDoctors = new ArrayList<>();
36 | private DoctorListAdapter mAdapter;
37 |
38 | @Override
39 | protected void onCreate(Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | setContentView(R.layout.activity_doctor);
42 | super.onCreateDrawer();
43 | ButterKnife.bind(this);
44 |
45 | Intent intent = getIntent();
46 | String specialty = intent.getStringExtra("specialty");
47 | String city = intent.getStringExtra("city");
48 | String state = intent.getStringExtra("state");
49 | getDoctors(specialty, city, state);
50 | }
51 |
52 | private void getDoctors(String specialty, String city, String state) {
53 | final BetterDoctorService betterDoctorService = new BetterDoctorService();
54 |
55 | betterDoctorService.findDoctorsByLocationAndSpecialty(specialty, city, state, new Callback() {
56 |
57 | @Override
58 | public void onFailure(Call call, IOException e) {
59 | e.printStackTrace();
60 | }
61 |
62 | @Override
63 | public void onResponse(Call call, Response response) {
64 | mDoctors = betterDoctorService.processResults(response);
65 |
66 | DoctorListActivity.this.runOnUiThread(new Runnable() {
67 | @Override
68 | public void run() {
69 |
70 | mAdapter = new DoctorListAdapter(getApplicationContext(), mDoctors);
71 | mRecyclerView.setAdapter(mAdapter);
72 | RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(DoctorListActivity.this);
73 | mRecyclerView.setLayoutManager(layoutManager);
74 | mRecyclerView.setHasFixedSize(true);
75 |
76 | if (mDoctors.isEmpty()) {
77 | mNoResultsImageView.setVisibility(View.VISIBLE);
78 | mNoResultsTextView.setVisibility(View.VISIBLE);
79 | }
80 | }
81 | });
82 | }
83 | });
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/FindDoctorActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.content.Intent;
4 | import android.content.SharedPreferences;
5 | import android.graphics.Typeface;
6 | import android.net.Uri;
7 | import android.preference.PreferenceManager;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.os.Bundle;
10 | import android.util.Log;
11 | import android.view.View;
12 | import android.widget.Button;
13 | import android.widget.EditText;
14 | import android.widget.Spinner;
15 | import android.widget.TextView;
16 |
17 | import com.epicodus.checkup.Constants;
18 | import com.epicodus.checkup.R;
19 |
20 | import butterknife.Bind;
21 | import butterknife.ButterKnife;
22 |
23 | public class FindDoctorActivity extends BaseActivity implements View.OnClickListener {
24 |
25 | private SharedPreferences mSharedPreferences;
26 | private SharedPreferences.Editor mEditor;
27 | private String mCityPreference;
28 | private int mStateSelectedPosition;
29 | private int mSpecialistSelectedPosition;
30 | private String mBetterDoctorURL = "http://www.betterdoctor.com";
31 |
32 | @Bind(R.id.specialtySearchButton) Button mSpecialtySearchButton;
33 | @Bind(R.id.cityEditText) TextView mCityEditText;
34 | @Bind(R.id.stateSpinner) Spinner mStateSpinner;
35 | @Bind(R.id.specialistSpinner) Spinner mSpecialistSpinner;
36 | @Bind(R.id.betterDoctorCreditTextView) TextView mBetterDoctorCreditTextView;
37 | @Bind(R.id.findDoctorTitle) TextView mFindDoctorTitle;
38 | @Bind(R.id.chooseSpecialistTextView) TextView mChooseSpecialistTextView;
39 |
40 | @Override
41 | protected void onCreate(Bundle savedInstanceState) {
42 | super.onCreate(savedInstanceState);
43 | setContentView(R.layout.activity_find_doctor);
44 | super.onCreateDrawer();
45 | ButterKnife.bind(this);
46 | mSpecialtySearchButton.setOnClickListener(this);
47 | mBetterDoctorCreditTextView.setOnClickListener(this);
48 |
49 | Typeface questrialFont = Typeface.createFromAsset(getAssets(), "fonts/Questrial-Regular.otf");
50 | mFindDoctorTitle.setTypeface(questrialFont);
51 | mChooseSpecialistTextView.setTypeface(questrialFont);
52 |
53 | mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
54 | mEditor = mSharedPreferences.edit();
55 |
56 | mCityPreference = mSharedPreferences.getString(Constants.PREFERENCES_CITY_KEY, null);
57 |
58 | if (mCityPreference != null) {
59 | mCityEditText.setText(mCityPreference);
60 | mStateSpinner.setSelection(mSharedPreferences.getInt(Constants.PREFERENCES_STATE_KEY, 0));
61 | mSpecialistSpinner.setSelection(mSharedPreferences.getInt(Constants.PREFERENCES_SPECIALTY_KEY, 0));
62 | }
63 | }
64 |
65 | @Override
66 | public void onClick(View v) {
67 | if(v == mSpecialtySearchButton) {
68 | String specialty = mSpecialistSpinner.getSelectedItem().toString().toLowerCase().replace(" ", "-");
69 | String city = mCityEditText.getText().toString().toLowerCase();
70 | String state = mStateSpinner.getSelectedItem().toString().toLowerCase();
71 | mStateSelectedPosition = mStateSpinner.getSelectedItemPosition();
72 | mSpecialistSelectedPosition = mSpecialistSpinner.getSelectedItemPosition();
73 |
74 | if (!(city).equals("")) {
75 | addToSharedPreferences(mSpecialistSelectedPosition, city, mStateSelectedPosition);
76 | }
77 |
78 | Intent intent = new Intent(FindDoctorActivity.this, DoctorListActivity.class);
79 | intent.putExtra("specialty", specialty);
80 | intent.putExtra("city", city);
81 | intent.putExtra("state", state);
82 |
83 | startActivity(intent);
84 | }
85 |
86 | if(v == mBetterDoctorCreditTextView) {
87 | Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(mBetterDoctorURL ));
88 | startActivity(webIntent);
89 | }
90 | }
91 |
92 | private void addToSharedPreferences(int specialty, String city, int state) {
93 | mEditor.putInt(Constants.PREFERENCES_SPECIALTY_KEY, specialty);
94 | mEditor.putString(Constants.PREFERENCES_CITY_KEY, city).apply();
95 | mEditor.putInt(Constants.PREFERENCES_STATE_KEY, state);
96 | mEditor.commit();
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/HealthActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Typeface;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.ListView;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.epicodus.checkup.Constants;
16 | import com.epicodus.checkup.R;
17 | import com.epicodus.checkup.models.Ailment;
18 | import com.google.firebase.auth.FirebaseAuth;
19 | import com.google.firebase.auth.FirebaseUser;
20 | import com.google.firebase.database.DatabaseReference;
21 | import com.google.firebase.database.FirebaseDatabase;
22 |
23 | import java.util.ArrayList;
24 |
25 | import butterknife.Bind;
26 | import butterknife.ButterKnife;
27 |
28 | public class HealthActivity extends BaseActivity implements View.OnClickListener {
29 | @Bind(R.id.ailmentTitleEditText) EditText mAilmentTitleEditText;
30 | @Bind(R.id.ailmentNotesEditText) EditText mAilmentNotesEditText;
31 | @Bind(R.id.addAilmentButton) Button mAddAilmentButton;
32 | @Bind(R.id.allAilmentsButton) Button mAllAilmentsButton;
33 | @Bind(R.id.ailmentFormTitle) TextView mAilmentFormTitle;
34 |
35 | @Override
36 | protected void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | setContentView(R.layout.activity_health);
39 | super.onCreateDrawer();
40 | ButterKnife.bind(this);
41 |
42 | Typeface questrialFont = Typeface.createFromAsset(getAssets(), "fonts/Questrial-Regular.otf");
43 | mAilmentFormTitle.setTypeface(questrialFont);
44 |
45 | mAddAilmentButton.setOnClickListener(this);
46 | mAllAilmentsButton.setOnClickListener(this);
47 | }
48 |
49 | @Override
50 | public void onClick(View v) {
51 | if(v == mAddAilmentButton) {
52 | String ailmentTitle = mAilmentTitleEditText.getText().toString();
53 | String ailmentNotes = mAilmentNotesEditText.getText().toString();
54 |
55 | Ailment ailment = new Ailment(ailmentTitle, ailmentNotes);
56 |
57 | FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
58 | String uid = user.getUid();
59 |
60 | DatabaseReference ailmentRef = FirebaseDatabase
61 | .getInstance()
62 | .getReference(Constants.FIREBASE_CHILD_AILMENTS)
63 | .child(uid);
64 |
65 | DatabaseReference pushRef = ailmentRef.push();
66 | String pushId = pushRef.getKey();
67 | ailment.setPushId(pushId);
68 | pushRef.setValue(ailment);
69 |
70 | Toast.makeText(this, "Save Successful!", Toast.LENGTH_SHORT).show();
71 | mAilmentTitleEditText.setText("");
72 | mAilmentNotesEditText.setText("");
73 | }
74 |
75 | if(v == mAllAilmentsButton) {
76 | Intent intent = new Intent(HealthActivity.this, AilmentsListActivity.class);
77 | startActivity(intent);
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.app.ProgressDialog;
4 | import android.content.Intent;
5 | import android.support.annotation.NonNull;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.util.Log;
9 | import android.view.View;
10 | import android.widget.Button;
11 | import android.widget.EditText;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.epicodus.checkup.R;
16 | import com.google.android.gms.tasks.OnCompleteListener;
17 | import com.google.android.gms.tasks.Task;
18 | import com.google.firebase.auth.AuthResult;
19 | import com.google.firebase.auth.FirebaseAuth;
20 | import com.google.firebase.auth.FirebaseUser;
21 |
22 | import butterknife.Bind;
23 | import butterknife.ButterKnife;
24 |
25 | public class LoginActivity extends AppCompatActivity implements View.OnClickListener {
26 | public static final String TAG = LoginActivity.class.getSimpleName();
27 |
28 | @Bind(R.id.passwordLoginButton) Button mPasswordLoginButton;
29 | @Bind(R.id.emailEditText) EditText mEmailEditText;
30 | @Bind(R.id.passwordEditText) EditText mPasswordEditText;
31 | @Bind(R.id.registerTextView) TextView mRegisterTextView;
32 |
33 | private FirebaseAuth mAuth;
34 | private FirebaseAuth.AuthStateListener mAuthListener;
35 | private ProgressDialog mAuthProgressDialog;
36 |
37 | @Override
38 | protected void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.activity_login);
41 |
42 | ButterKnife.bind(this);
43 | mRegisterTextView.setOnClickListener(this);
44 | mPasswordLoginButton.setOnClickListener(this);
45 |
46 | mAuth = FirebaseAuth.getInstance();
47 |
48 | mAuthListener = new FirebaseAuth.AuthStateListener() {
49 |
50 | @Override
51 | public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
52 | FirebaseUser user = firebaseAuth.getCurrentUser();
53 | if (user != null) {
54 | Intent intent = new Intent(LoginActivity.this, MainActivity.class);
55 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
56 | startActivity(intent);
57 | finish();
58 | }
59 | }
60 | };
61 |
62 | createAuthProgressDialog();
63 | }
64 |
65 | @Override
66 | public void onClick(View view) {
67 | if (view == mRegisterTextView) {
68 | Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class);
69 | startActivity(intent);
70 | finish();
71 | }
72 | if (view == mPasswordLoginButton) {
73 | loginWithPassword();
74 | }
75 | }
76 |
77 | private void createAuthProgressDialog() {
78 | mAuthProgressDialog = new ProgressDialog(this);
79 | mAuthProgressDialog.setTitle("Loading...");
80 | mAuthProgressDialog.setMessage("Authenticating with Firebase...");
81 | mAuthProgressDialog.setCancelable(false);
82 | }
83 |
84 | private void loginWithPassword() {
85 | String email = mEmailEditText.getText().toString().trim();
86 | String password = mPasswordEditText.getText().toString().trim();
87 |
88 | if (email.equals("")) {
89 | mEmailEditText.setError("Please enter your email");
90 | return;
91 | }
92 | if (password.equals("")) {
93 | mPasswordEditText.setError("Password cannot be blank");
94 | return;
95 | }
96 |
97 | mAuthProgressDialog.show();
98 |
99 | mAuth.signInWithEmailAndPassword(email, password)
100 | .addOnCompleteListener(this, new OnCompleteListener() {
101 | @Override
102 | public void onComplete(@NonNull Task task) {
103 | mAuthProgressDialog.dismiss();
104 | Log.d(TAG, "signInWithEmail:onComplete:" + task.isSuccessful());
105 | if (!task.isSuccessful()) {
106 | Log.w(TAG, "signInWithEmail", task.getException());
107 | Toast.makeText(LoginActivity.this, "Authentication failed.",
108 | Toast.LENGTH_SHORT).show();
109 | }
110 | }
111 | });
112 | }
113 |
114 | @Override
115 | public void onStart() {
116 | super.onStart();
117 | mAuth.addAuthStateListener(mAuthListener);
118 | }
119 |
120 | @Override
121 | public void onStop() {
122 | super.onStop();
123 | if (mAuthListener != null) {
124 | mAuth.removeAuthStateListener(mAuthListener);
125 | }
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Typeface;
5 | import android.net.Uri;
6 | import android.support.annotation.NonNull;
7 | import android.support.design.widget.NavigationView;
8 | import android.support.v4.view.GravityCompat;
9 | import android.support.v4.widget.DrawerLayout;
10 | import android.support.v7.app.ActionBarDrawerToggle;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.os.Bundle;
13 | import android.util.Log;
14 | import android.view.Menu;
15 | import android.view.MenuInflater;
16 | import android.view.MenuItem;
17 | import android.view.View;
18 | import android.widget.Button;
19 | import android.widget.TextView;
20 | import android.widget.Toast;
21 |
22 | import com.epicodus.checkup.R;
23 | import com.google.firebase.auth.FirebaseAuth;
24 | import com.google.firebase.auth.FirebaseUser;
25 |
26 | import butterknife.Bind;
27 | import butterknife.ButterKnife;
28 |
29 | public class MainActivity extends BaseActivity implements View.OnClickListener, NavigationView.OnNavigationItemSelectedListener {
30 | @Bind(R.id.appointmentsButton) Button mAppointmentsButton;
31 | @Bind(R.id.healthButton) Button mHealthButton;
32 | @Bind(R.id.mainTitleTextView) TextView mMainTitleTextView;
33 |
34 | private FirebaseAuth mAuth;
35 | private FirebaseAuth.AuthStateListener mAuthListener;
36 |
37 | @Override
38 | protected void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.activity_main);
41 | super.onCreateDrawer();
42 | ButterKnife.bind(this);
43 |
44 | Typeface questrialFont = Typeface.createFromAsset(getAssets(), "fonts/Questrial-Regular.otf");
45 | mMainTitleTextView.setTypeface(questrialFont);
46 |
47 | mAppointmentsButton.setOnClickListener(this);
48 | mHealthButton.setOnClickListener(this);
49 |
50 | mAuth = FirebaseAuth.getInstance();
51 | mAuthListener = new FirebaseAuth.AuthStateListener() {
52 | @Override
53 | public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
54 | FirebaseUser user = firebaseAuth.getCurrentUser();
55 | if (user != null) {
56 | getSupportActionBar().setTitle("Welcome, " + user.getDisplayName() + "!");
57 | } else {
58 |
59 | }
60 | }
61 | };
62 | }
63 |
64 | @Override
65 | public void onClick(View v) {
66 | if(v == mAppointmentsButton) {
67 | Intent intent = new Intent(MainActivity.this, AppointmentsActivity.class);
68 | startActivity(intent);
69 | }
70 | if(v == mHealthButton) {
71 | Intent intent = new Intent(MainActivity.this, HealthActivity.class);
72 | startActivity(intent);
73 | }
74 | }
75 |
76 | @Override
77 | public boolean onCreateOptionsMenu(Menu menu) {
78 | MenuInflater inflater = getMenuInflater();
79 | inflater.inflate(R.menu.menu_main, menu);
80 | return super.onCreateOptionsMenu(menu);
81 | }
82 |
83 | @Override
84 | public boolean onOptionsItemSelected(MenuItem item) {
85 | int id = item.getItemId();
86 | if (id == R.id.action_logout) {
87 | logout();
88 | return true;
89 | }
90 | return super.onOptionsItemSelected(item);
91 | }
92 |
93 | private void logout() {
94 | FirebaseAuth.getInstance().signOut();
95 | Intent intent = new Intent(MainActivity.this, LoginActivity.class);
96 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
97 | startActivity(intent);
98 | finish();
99 | }
100 |
101 | @Override
102 | public void onStart() {
103 | super.onStart();
104 | mAuth.addAuthStateListener(mAuthListener);
105 | }
106 |
107 | @Override
108 | public void onStop() {
109 | super.onStop();
110 | if (mAuthListener != null) {
111 | mAuth.removeAuthStateListener(mAuthListener);
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/NavigationDrawerActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.FloatingActionButton;
5 | import android.support.design.widget.Snackbar;
6 | import android.view.View;
7 | import android.support.design.widget.NavigationView;
8 | import android.support.v4.view.GravityCompat;
9 | import android.support.v4.widget.DrawerLayout;
10 | import android.support.v7.app.ActionBarDrawerToggle;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.support.v7.widget.Toolbar;
13 | import android.view.Menu;
14 | import android.view.MenuItem;
15 |
16 | import com.epicodus.checkup.R;
17 |
18 | public class NavigationDrawerActivity extends AppCompatActivity
19 | implements NavigationView.OnNavigationItemSelectedListener {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.activity_navigation_drawer);
25 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
26 | setSupportActionBar(toolbar);
27 |
28 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
29 | fab.setOnClickListener(new View.OnClickListener() {
30 | @Override
31 | public void onClick(View view) {
32 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
33 | .setAction("Action", null).show();
34 | }
35 | });
36 |
37 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
38 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
39 | this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
40 | drawer.setDrawerListener(toggle);
41 | toggle.syncState();
42 |
43 | NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
44 | navigationView.setNavigationItemSelectedListener(this);
45 | }
46 |
47 | @Override
48 | public void onBackPressed() {
49 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
50 | if (drawer.isDrawerOpen(GravityCompat.START)) {
51 | drawer.closeDrawer(GravityCompat.START);
52 | } else {
53 | super.onBackPressed();
54 | }
55 | }
56 |
57 | @Override
58 | public boolean onCreateOptionsMenu(Menu menu) {
59 | // Inflate the menu; this adds items to the action bar if it is present.
60 | getMenuInflater().inflate(R.menu.navigation_drawer, menu);
61 | return true;
62 | }
63 |
64 | @Override
65 | public boolean onOptionsItemSelected(MenuItem item) {
66 | // Handle action bar item clicks here. The action bar will
67 | // automatically handle clicks on the Home/Up button, so long
68 | // as you specify a parent activity in AndroidManifest.xml.
69 | int id = item.getItemId();
70 |
71 | //noinspection SimplifiableIfStatement
72 | if (id == R.id.action_settings) {
73 | return true;
74 | }
75 |
76 | return super.onOptionsItemSelected(item);
77 | }
78 |
79 | @SuppressWarnings("StatementWithEmptyBody")
80 | @Override
81 | public boolean onNavigationItemSelected(MenuItem item) {
82 | // Handle navigation view item clicks here.
83 | int id = item.getItemId();
84 |
85 | if (id == R.id.nav_appointments) {
86 |
87 | } else if (id == R.id.nav_health) {
88 |
89 | } else if (id == R.id.nav_doctor) {
90 |
91 | } else if (id == R.id.nav_share) {
92 |
93 | } else if (id == R.id.nav_send) {
94 |
95 | }
96 |
97 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
98 | drawer.closeDrawer(GravityCompat.START);
99 | return true;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/epicodus/checkup/ui/SavedDoctorListActivity.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup.ui;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.support.v7.widget.LinearLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 |
8 | import com.epicodus.checkup.Constants;
9 | import com.epicodus.checkup.R;
10 | import com.epicodus.checkup.adapters.FirebaseDoctorViewHolder;
11 | import com.epicodus.checkup.models.Doctor;
12 | import com.firebase.ui.database.FirebaseRecyclerAdapter;
13 | import com.google.firebase.auth.FirebaseAuth;
14 | import com.google.firebase.auth.FirebaseUser;
15 | import com.google.firebase.database.DatabaseReference;
16 | import com.google.firebase.database.FirebaseDatabase;
17 |
18 | import butterknife.Bind;
19 | import butterknife.ButterKnife;
20 |
21 | public class SavedDoctorListActivity extends BaseActivity {
22 | private DatabaseReference mDoctorReference;
23 | private FirebaseRecyclerAdapter mFirebaseAdapter;
24 |
25 | @Bind(R.id.recyclerView) RecyclerView mRecyclerView;
26 |
27 | @Override
28 | protected void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 | setContentView(R.layout.activity_doctor);
31 | super.onCreateDrawer();
32 | ButterKnife.bind(this);
33 |
34 | FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
35 | String uid = user.getUid();
36 |
37 | mDoctorReference = FirebaseDatabase
38 | .getInstance()
39 | .getReference(Constants.FIREBASE_CHILD_DOCTORS)
40 | .child(uid);
41 |
42 | setUpFirebaseAdapter();
43 | }
44 |
45 | private void setUpFirebaseAdapter() {
46 | mFirebaseAdapter = new FirebaseRecyclerAdapter (Doctor.class, R.layout.doctor_list_item, FirebaseDoctorViewHolder.class, mDoctorReference) {
47 |
48 | @Override
49 | protected void populateViewHolder(FirebaseDoctorViewHolder viewHolder,
50 | Doctor model, int position) {
51 | viewHolder.bindDoctor(model);
52 | }
53 | };
54 | mRecyclerView.setHasFixedSize(true);
55 | mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
56 | mRecyclerView.setAdapter(mFirebaseAdapter);
57 | }
58 |
59 | @Override
60 | protected void onDestroy() {
61 | super.onDestroy();
62 | mFirebaseAdapter.cleanup();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_add_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_add_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_done_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_done_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_home_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_home_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_local_hospital_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_local_hospital_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_today_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-hdpi/ic_today_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_add_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_add_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_done_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_done_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_home_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_home_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_local_hospital_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_local_hospital_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_today_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/ic_today_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/logo_round_medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-mdpi/logo_round_medium.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_add_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_add_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_done_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_done_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_home_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_home_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_local_hospital_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_local_hospital_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_today_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xhdpi/ic_today_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_add_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_add_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_done_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_done_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_home_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_home_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_local_hospital_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_local_hospital_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_today_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxhdpi/ic_today_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_add_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_add_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_done_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_done_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_home_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_home_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_local_hospital_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_local_hospital_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_today_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable-xxxhdpi/ic_today_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable/avatar_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blue_background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable/blue_background.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nav_header.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable/nav_header.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/plussign.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable/plussign.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pressed_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
6 |
7 |
8 |
9 | -
10 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/spinner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/yoga.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/drawable/yoga.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
26 |
27 |
37 |
38 |
49 |
50 |
51 |
52 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ailment_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
20 |
21 |
22 |
23 |
24 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ailments_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
21 |
22 |
37 |
38 |
47 |
48 |
49 |
50 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_appointment_form.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
22 |
23 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_appointments.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
26 |
27 |
38 |
39 |
51 |
52 |
63 |
64 |
65 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_base.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_create_account.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
31 |
32 |
45 |
46 |
59 |
60 |
73 |
74 |
75 |
84 |
85 |
95 |
96 |
97 |
98 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_doctor.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
24 |
25 |
40 |
41 |
50 |
51 |
52 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_doctor_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
24 |
25 |
26 |
27 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_find_doctor.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
20 |
21 |
31 |
32 |
45 |
46 |
56 |
57 |
70 |
71 |
85 |
86 |
96 |
97 |
105 |
106 |
116 |
117 |
118 |
119 |
128 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_health.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
30 |
31 |
43 |
44 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
76 |
77 |
87 |
88 |
89 |
98 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
32 |
33 |
45 |
46 |
47 |
56 |
57 |
67 |
68 |
69 |
70 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
28 |
29 |
35 |
36 |
48 |
49 |
50 |
56 |
67 |
68 |
69 |
70 |
71 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/ailment_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/doctor_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
20 |
21 |
29 |
30 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_ailment_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
15 |
27 |
28 |
38 |
39 |
49 |
50 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_doctor_detail.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
21 |
22 |
32 |
33 |
42 |
43 |
44 |
47 |
48 |
60 |
61 |
71 |
72 |
81 |
82 |
90 |
91 |
95 |
96 |
106 |
107 |
108 |
109 |
110 |
111 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
26 |
27 |
28 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_navigation_drawer_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #8bc34a
4 | #689f38
5 | #dcedc8
6 | #ffffff
7 | #00bcd4
8 | #ffc107
9 | #212121
10 | #727272
11 | #B6B6B6
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 | 16dp
7 | 160dp
8 | 16dp
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CheckUp!
3 |
4 | Hello blank fragment
5 | --
6 |
7 |
8 | - AK
9 | - AL
10 | - AZ
11 | - AR
12 | - CA
13 | - CO
14 | - CT
15 | - DE
16 | - FL
17 | - GA
18 | - HI
19 | - ID
20 | - IL
21 | - IN
22 | - IA
23 | - KS
24 | - KY
25 | - LA
26 | - ME
27 | - MD
28 | - MA
29 | - MI
30 | - MN
31 | - MS
32 | - MO
33 | - MT
34 | - NE
35 | - NV
36 | - NH
37 | - NJ
38 | - NM
39 | - NY
40 | - NC
41 | - ND
42 | - OH
43 | - OK
44 | - OR
45 | - PA
46 | - RI
47 | - SC
48 | - SD
49 | - TN
50 | - TX
51 | - UT
52 | - VT
53 | - VA
54 | - WA
55 | - WV
56 | - WI
57 | - WY
58 |
59 |
60 |
61 | - Acupuncturist
62 | - Allergist
63 | - Cardiologist
64 | - Dentist
65 | - Dermatologist
66 | - Dietitian
67 | - Ear Nose Throat Doctor
68 | - Gastroenterologist
69 | - General Practitioner
70 | - Gynecologist
71 | - Hepatologist
72 | - Neurologist
73 | - Nutritionist
74 | - Optometrist
75 | - Podiatrist
76 | - Pulmonologist
77 | - Psychiatrist
78 | - Urologist
79 |
80 |
81 | NavigationDrawerActivity
82 |
83 | Open navigation drawer
84 | Close navigation drawer
85 |
86 | Settings
87 | open
88 | close
89 |
90 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
17 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/test/java/com/epicodus/checkup/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.epicodus.checkup;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.2'
9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10 | classpath 'com.google.gms:google-services:3.0.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | jcenter()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | BetterDoctorConsumerKey = "de52741255a328e5584c98970935462c"
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/screenshots.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshleyRayMaceli/check-up-android/e9ada11a52daeaaf3ac4eb0f8d7f9ebd234082ab/screenshots.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------