Commit 9ac2bacb authored by Mrunzzz's avatar Mrunzzz Committed by GitHub

Merge pull request #3 from unstablebrainiac/master

Update Master
parents affee3de a4cbc7b8
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/IITB-App.iml" filepath="$PROJECT_DIR$/IITB-App.iml" /> <module fileurl="file://$PROJECT_DIR$/IITB-App.iml" filepath="$PROJECT_DIR$/IITB-App.iml" />
<module fileurl="file://$PROJECT_DIR$/IITBApp.iml" filepath="$PROJECT_DIR$/IITBApp.iml" />
<module fileurl="file://D:\IITB-App\IITBApp.iml" filepath="D:\IITB-App\IITBApp.iml" /> <module fileurl="file://D:\IITB-App\IITBApp.iml" filepath="D:\IITB-App\IITBApp.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules> </modules>
......
...@@ -11,6 +11,7 @@ android { ...@@ -11,6 +11,7 @@ android {
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "string", "google_maps_key", (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
} }
buildTypes { buildTypes {
release { release {
...@@ -29,6 +30,7 @@ dependencies { ...@@ -29,6 +30,7 @@ dependencies {
compile 'net.openid:appauth:0.2.0' compile 'net.openid:appauth:0.2.0'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1' compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-maps:10.2.6'
compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:support-v4:25.3.1'
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="in.ac.iitb.gymkhana.iitbapp"> package="in.ac.iitb.gymkhana.iitbapp">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" <application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:theme="@style/AppTheme"> android:supportsRtl="true" android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- The API key for Google Maps-based APIs. -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity android:name=".MainActivity" android:label="@string/app_name" <activity android:name=".MainActivity" android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<intent-filter> <intent-filter>
......
...@@ -17,6 +17,18 @@ import android.view.MenuItem; ...@@ -17,6 +17,18 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import in.ac.iitb.gymkhana.iitbapp.fragments.CalendarFragment; import in.ac.iitb.gymkhana.iitbapp.fragments.CalendarFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.MapFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.FeedFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.PTCellFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.MyEventsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.MessMenuFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.GCRankingsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.CMSFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.ContactsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.AboutFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.TimetableFragment;
public class MainActivity extends AppCompatActivity public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener { implements NavigationView.OnNavigationItemSelectedListener {
...@@ -86,28 +98,39 @@ public class MainActivity extends AppCompatActivity ...@@ -86,28 +98,39 @@ public class MainActivity extends AppCompatActivity
int id = item.getItemId(); int id = item.getItemId();
if (id == R.id.nav_feed) { if (id == R.id.nav_feed) {
// Handle the camera action FeedFragment feedFragment = new FeedFragment();
updateFragment(feedFragment);
} else if (id == R.id.nav_my_events) { } else if (id == R.id.nav_my_events) {
MyEventsFragment myeventsFragment = new MyEventsFragment();
updateFragment(myeventsFragment);
} else if (id == R.id.nav_pt_cell) { } else if (id == R.id.nav_pt_cell) {
PTCellFragment ptcellFragment = new PTCellFragment();
updateFragment(ptcellFragment);
} else if (id == R.id.nav_mess_menu) { } else if (id == R.id.nav_mess_menu) {
MessMenuFragment messmenuFragment = new MessMenuFragment();
updateFragment(messmenuFragment);
} else if (id == R.id.nav_gc_rankings) { } else if (id == R.id.nav_gc_rankings) {
GCRankingsFragment gcrankingsFragment = new GCRankingsFragment();
updateFragment(gcrankingsFragment);
} else if (id == R.id.nav_calendar) { } else if (id == R.id.nav_calendar) {
CalendarFragment calendarFragment = new CalendarFragment(); CalendarFragment calendarFragment = new CalendarFragment();
updateFragment(calendarFragment); updateFragment(calendarFragment);
} else if (id == R.id.nav_cms) { } else if (id == R.id.nav_cms) {
CMSFragment cmsFragment = new CMSFragment();
updateFragment(cmsFragment);
} else if (id == R.id.nav_timetable) { } else if (id == R.id.nav_timetable) {
TimetableFragment timetableFragment = new TimetableFragment();
updateFragment(timetableFragment);
} else if (id == R.id.nav_map) { } else if (id == R.id.nav_map) {
MapFragment mapFragment = new MapFragment();
updateFragment(mapFragment);
} else if (id == R.id.nav_contacts) { } else if (id == R.id.nav_contacts) {
ContactsFragment contactsFragment = new ContactsFragment();
updateFragment(contactsFragment);
} else if (id == R.id.nav_about) { } else if (id == R.id.nav_about) {
AboutFragment aboutFragment = new AboutFragment();
updateFragment(aboutFragment);
} }
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
......
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class AboutFragment extends Fragment {
public AboutFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_about, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class CMSFragment extends Fragment {
public CMSFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_cms, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class ContactsFragment extends Fragment {
public ContactsFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_contacts, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class FeedFragment extends Fragment {
public FeedFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_feed, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class GCRankingsFragment extends Fragment {
public GCRankingsFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_gc_rankings, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
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.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import in.ac.iitb.gymkhana.iitbapp.R;
public class MapFragment extends Fragment implements OnMapReadyCallback {
SupportMapFragment gMapFragment;
GoogleMap gMap = null;
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_map, container, false);
gMapFragment = (SupportMapFragment) this.getChildFragmentManager().findFragmentById(R.id.viewMap);
gMapFragment.getMapAsync(this);
return view;
}
@Override
public void onMapReady(GoogleMap googleMap) {
// Position the map's camera near Mumbai
LatLng iitb = new LatLng(19.1334, 72.9133);
googleMap.addMarker(new MarkerOptions().position(iitb)
.title("Marker in IITB"));
googleMap.moveCamera(CameraUpdateFactory.newLatLng(iitb));
}
}
\ No newline at end of file
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class MessMenuFragment extends Fragment {
public MessMenuFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_mess_menu, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class MyEventsFragment extends Fragment {
public MyEventsFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_my_events, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class PTCellFragment extends Fragment {
public PTCellFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_pt_cell, container, false);
}
}
package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import in.ac.iitb.gymkhana.iitbapp.R;
/**
* A simple {@link Fragment} subclass.
*/
public class TimetableFragment extends Fragment {
public TimetableFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_timetable, container, false);
}
}
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.AboutFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.CMSFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.ContactsFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.FeedFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.GCRankingsFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:map="http://schemas.android.com/apk/res-auto"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.MapFragment">
<fragment
android:id="@+id/viewMap"
android:layout_width="match_parent"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_height="match_parent"
map:cameraZoom="18"
/>
</FrameLayout>
\ No newline at end of file
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.MessMenuFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.MyEventsFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.PTCellFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.TimetableFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
...@@ -15,3 +15,6 @@ org.gradle.jvmargs=-Xmx1536m ...@@ -15,3 +15,6 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
# TODO Replace Key and put in local:properties
GOOGLE_MAPS_API_KEY=AIzaSyB72DhM4E1NW0F-_SLnYtYYvz0rT9kne-U
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment