diff --git a/.gitignore b/.gitignore
index 39fb081..2bd3705 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,6 @@
/build
/captures
.externalNativeBuild
+google-services.json
+osu_logo.png
+login_background.jpg
diff --git a/app/build.gradle b/app/build.gradle
index e81c09b..8718f74 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -30,5 +30,9 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-maps:11.6.2'
implementation 'com.google.android.gms:play-services-location:11.6.2'
+ implementation 'com.google.firebase:firebase-database:11.6.2'
+ implementation 'com.google.firebase:firebase-core:11.6.2'
+ implementation 'com.google.firebase:firebase-auth:11.6.2'
+ implementation 'com.google.firebase:firebase-crash:11.6.2'
implementation 'com.android.support:design:27.0.1'
}
diff --git a/app/src/main/java/edu/osu/sphs/soundmap/fragments/LoginFragment.java b/app/src/main/java/edu/osu/sphs/soundmap/fragments/LoginFragment.java
new file mode 100644
index 0000000..ec7759e
--- /dev/null
+++ b/app/src/main/java/edu/osu/sphs/soundmap/fragments/LoginFragment.java
@@ -0,0 +1,40 @@
+package edu.osu.sphs.soundmap.fragments;
+
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import edu.osu.sphs.soundmap.R;
+
+/**
+ * A simple {@link Fragment} subclass.
+ * Use the {@link LoginFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class LoginFragment extends Fragment {
+
+ public LoginFragment() {
+ // Required empty public constructor
+ }
+
+ /**
+ * Use this factory method to create a new instance of
+ * this fragment using the provided parameters.
+ *
+ * @return A new instance of fragment LoginFragment.
+ */
+ // TODO: Rename and change types and number of parameters
+ public static LoginFragment newInstance() {
+ LoginFragment fragment = new LoginFragment();
+ return fragment;
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_login, container, false);
+ }
+
+}
diff --git a/app/src/main/java/edu/osu/sphs/soundmap/fragments/MapFragment.java b/app/src/main/java/edu/osu/sphs/soundmap/fragments/MapFragment.java
index 903c107..cb070fd 100644
--- a/app/src/main/java/edu/osu/sphs/soundmap/fragments/MapFragment.java
+++ b/app/src/main/java/edu/osu/sphs/soundmap/fragments/MapFragment.java
@@ -51,11 +51,6 @@ public static MapFragment newInstance() {
return fragment;
}
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- }
-
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
diff --git a/app/src/main/java/edu/osu/sphs/soundmap/fragments/ProfileFragment.java b/app/src/main/java/edu/osu/sphs/soundmap/fragments/ProfileFragment.java
index 39ad43a..fcae8e3 100644
--- a/app/src/main/java/edu/osu/sphs/soundmap/fragments/ProfileFragment.java
+++ b/app/src/main/java/edu/osu/sphs/soundmap/fragments/ProfileFragment.java
@@ -1,13 +1,24 @@
package edu.osu.sphs.soundmap.fragments;
-import android.content.Context;
-import android.net.Uri;
import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.MapView;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.LatLngBounds;
+import com.google.android.gms.maps.model.MarkerOptions;
+
+import java.util.Random;
+
import edu.osu.sphs.soundmap.R;
/**
@@ -15,7 +26,11 @@
* Use the {@link ProfileFragment#newInstance} factory method to
* create an instance of this fragment.
*/
-public class ProfileFragment extends Fragment {
+public class ProfileFragment extends Fragment implements OnMapReadyCallback {
+
+ private static final String TAG = "ProfileFragment";
+ private MapView mapView;
+ private GoogleMap googleMap;
public ProfileFragment() {
// Required empty public constructor
@@ -44,4 +59,29 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_profile, container, false);
}
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ mapView = view.findViewById(R.id.map_background);
+ mapView.onCreate(savedInstanceState);
+ mapView.getMapAsync(this);
+ }
+
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ this.googleMap = googleMap;
+ Random r = new Random(System.currentTimeMillis());
+ LatLngBounds.Builder builder = LatLngBounds.builder();
+ for (int i = 0; i < 10; i++) {
+ r.setSeed(System.currentTimeMillis() * (System.currentTimeMillis() % 532));
+ double lat = (r.nextDouble() * .3) + 39.8;
+ double lon = (r.nextDouble() * .8) - 83.3;
+ LatLng latLng = new LatLng(lat, lon);
+ builder.include(latLng);
+ Log.d(TAG, "onMapReady: latLng " + latLng.toString());
+ googleMap.addMarker(new MarkerOptions().position(latLng).title("Marker " + i));
+ }
+ mapView.onResume();
+ googleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 0));
+ }
}
diff --git a/app/src/main/java/edu/osu/sphs/soundmap/util/ViewPagerAdapter.java b/app/src/main/java/edu/osu/sphs/soundmap/util/ViewPagerAdapter.java
index 119a687..223d461 100644
--- a/app/src/main/java/edu/osu/sphs/soundmap/util/ViewPagerAdapter.java
+++ b/app/src/main/java/edu/osu/sphs/soundmap/util/ViewPagerAdapter.java
@@ -4,11 +4,10 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;
-import android.util.SparseArray;
+import edu.osu.sphs.soundmap.fragments.LoginFragment;
import edu.osu.sphs.soundmap.fragments.MapFragment;
import edu.osu.sphs.soundmap.fragments.MeasureFragment;
-import edu.osu.sphs.soundmap.fragments.ProfileFragment;
/**
* Created by Gus on 11/23/2017. ViewPagerAdapter is the adapter for the viewPager object in the
@@ -31,7 +30,7 @@ public Fragment getItem(int position) {
case 1:
return MeasureFragment.newInstance();
case 2:
- return ProfileFragment.newInstance();
+ return LoginFragment.newInstance();
default:
Log.e("ViewPagerAdapter", "Returned a null fragment, index out of range");
return null;
diff --git a/app/src/main/res/drawable/ic_android.xml b/app/src/main/res/drawable/ic_android.xml
index d95e1bd..d9548fb 100644
--- a/app/src/main/res/drawable/ic_android.xml
+++ b/app/src/main/res/drawable/ic_android.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
diff --git a/app/src/main/res/drawable/login_background_box.xml b/app/src/main/res/drawable/login_background_box.xml
new file mode 100644
index 0000000..a19a22f
--- /dev/null
+++ b/app/src/main/res/drawable/login_background_box.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/login_button_background.xml b/app/src/main/res/drawable/login_button_background.xml
new file mode 100644
index 0000000..854abeb
--- /dev/null
+++ b/app/src/main/res/drawable/login_button_background.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/login_input_box.xml b/app/src/main/res/drawable/login_input_box.xml
new file mode 100644
index 0000000..73c656f
--- /dev/null
+++ b/app/src/main/res/drawable/login_input_box.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_login.xml b/app/src/main/res/layout/fragment_login.xml
new file mode 100644
index 0000000..a9ce0f2
--- /dev/null
+++ b/app/src/main/res/layout/fragment_login.xml
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml
index 4fe38eb..ce0bd16 100644
--- a/app/src/main/res/layout/fragment_map.xml
+++ b/app/src/main/res/layout/fragment_map.xml
@@ -8,7 +8,6 @@
+ android:layout_height="match_parent" />
diff --git a/app/src/main/res/layout/fragment_profile.xml b/app/src/main/res/layout/fragment_profile.xml
index 0369dff..dcb5545 100644
--- a/app/src/main/res/layout/fragment_profile.xml
+++ b/app/src/main/res/layout/fragment_profile.xml
@@ -1,14 +1,68 @@
-
-
-
+ android:layout_height="wrap_content">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 53f9ea0..704c177 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -10,4 +10,9 @@
#c2c2c2
#666666
#474747
+
+ #f3f3f3
+ #acacac
+
+ #8d606060
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 44f4341..7f1b434 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2,4 +2,9 @@
Sound Map
Map
Profile
+ My Recordings
+
+
+ Hello blank fragment
+ Login