Commit f8321f3e authored by Mrunzzz's avatar Mrunzzz
parents 2517ae74 b8dc6615
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -7,7 +7,7 @@ import android.support.test.runner.AndroidJUnit4; ...@@ -7,7 +7,7 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
/** /**
* Instrumentation test, which will execute on an Android device. * Instrumentation test, which will execute on an Android device.
......
<?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" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" <application
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true"
android:supportsRtl="true" android:theme="@style/AppTheme"> android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data <meta-data
android:name="com.google.android.gms.version" android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" /> android:value="@integer/google_play_services_version" />
...@@ -14,7 +19,10 @@ ...@@ -14,7 +19,10 @@
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_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>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -25,8 +33,8 @@ ...@@ -25,8 +33,8 @@
<activity android:name=".LoginActivity"> <activity android:name=".LoginActivity">
<intent-filter> <intent-filter>
<action android:name="HANDLE_AUTHORIZATION_RESPONSE"/> <action android:name="HANDLE_AUTHORIZATION_RESPONSE" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -16,20 +16,19 @@ import android.view.Menu; ...@@ -16,20 +16,19 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import in.ac.iitb.gymkhana.iitbapp.fragments.AboutFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.CMSFragment;
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.ContactsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.FeedFragment; 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.GCRankingsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.CMSFragment; import in.ac.iitb.gymkhana.iitbapp.fragments.MapFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.ContactsFragment; import in.ac.iitb.gymkhana.iitbapp.fragments.MessMenuFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.AboutFragment; import in.ac.iitb.gymkhana.iitbapp.fragments.MyEventsFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.PTCellFragment;
import in.ac.iitb.gymkhana.iitbapp.fragments.TimetableFragment; import in.ac.iitb.gymkhana.iitbapp.fragments.TimetableFragment;
public class MainActivity extends AppCompatActivity public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener { implements NavigationView.OnNavigationItemSelectedListener {
...@@ -40,15 +39,6 @@ public class MainActivity extends AppCompatActivity ...@@ -40,15 +39,6 @@ public class MainActivity extends AppCompatActivity
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
...@@ -97,40 +87,51 @@ public class MainActivity extends AppCompatActivity ...@@ -97,40 +87,51 @@ public class MainActivity extends AppCompatActivity
// Handle navigation view item clicks here. // Handle navigation view item clicks here.
int id = item.getItemId(); int id = item.getItemId();
if (id == R.id.nav_feed) { switch (id) {
FeedFragment feedFragment = new FeedFragment(); case R.id.nav_feed:
updateFragment(feedFragment); FeedFragment feedFragment = new FeedFragment();
} else if (id == R.id.nav_my_events) { updateFragment(feedFragment);
MyEventsFragment myeventsFragment = new MyEventsFragment(); break;
updateFragment(myeventsFragment); case R.id.nav_my_events:
} else if (id == R.id.nav_pt_cell) { MyEventsFragment myeventsFragment = new MyEventsFragment();
PTCellFragment ptcellFragment = new PTCellFragment(); updateFragment(myeventsFragment);
updateFragment(ptcellFragment); break;
} else if (id == R.id.nav_mess_menu) { case R.id.nav_pt_cell:
MessMenuFragment messmenuFragment = new MessMenuFragment(); PTCellFragment ptcellFragment = new PTCellFragment();
updateFragment(messmenuFragment); updateFragment(ptcellFragment);
} else if (id == R.id.nav_gc_rankings) { break;
GCRankingsFragment gcrankingsFragment = new GCRankingsFragment(); case R.id.nav_mess_menu:
updateFragment(gcrankingsFragment); MessMenuFragment messmenuFragment = new MessMenuFragment();
} else if (id == R.id.nav_calendar) { updateFragment(messmenuFragment);
CalendarFragment calendarFragment = new CalendarFragment(); break;
updateFragment(calendarFragment); case R.id.nav_gc_rankings:
} else if (id == R.id.nav_cms) { GCRankingsFragment gcrankingsFragment = new GCRankingsFragment();
CMSFragment cmsFragment = new CMSFragment(); updateFragment(gcrankingsFragment);
updateFragment(cmsFragment); break;
} else if (id == R.id.nav_timetable) { case R.id.nav_calendar:
TimetableFragment timetableFragment = new TimetableFragment(); CalendarFragment calendarFragment = new CalendarFragment();
updateFragment(timetableFragment); updateFragment(calendarFragment);
} else if (id == R.id.nav_map) { break;
MapFragment mapFragment = new MapFragment(); case R.id.nav_cms:
updateFragment(mapFragment); CMSFragment cmsFragment = new CMSFragment();
updateFragment(cmsFragment);
} else if (id == R.id.nav_contacts) { break;
ContactsFragment contactsFragment = new ContactsFragment(); case R.id.nav_timetable:
updateFragment(contactsFragment); TimetableFragment timetableFragment = new TimetableFragment();
} else if (id == R.id.nav_about) { updateFragment(timetableFragment);
AboutFragment aboutFragment = new AboutFragment(); break;
updateFragment(aboutFragment); case R.id.nav_map:
MapFragment mapFragment = new MapFragment();
updateFragment(mapFragment);
break;
case R.id.nav_contacts:
ContactsFragment contactsFragment = new ContactsFragment();
updateFragment(contactsFragment);
break;
case R.id.nav_about:
AboutFragment aboutFragment = new AboutFragment();
updateFragment(aboutFragment);
break;
} }
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
......
package in.ac.iitb.gymkhana.iitbapp.fragments; package in.ac.iitb.gymkhana.iitbapp.fragments;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.CalendarView; import android.widget.CalendarView;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import in.ac.iitb.gymkhana.iitbapp.R; import in.ac.iitb.gymkhana.iitbapp.R;
...@@ -21,6 +18,7 @@ public class CalendarFragment extends Fragment { ...@@ -21,6 +18,7 @@ public class CalendarFragment extends Fragment {
private View view; private View view;
private Toast toast; private Toast toast;
public CalendarFragment() { public CalendarFragment() {
// Required empty public constructor // Required empty public constructor
} }
...@@ -30,7 +28,7 @@ public class CalendarFragment extends Fragment { ...@@ -30,7 +28,7 @@ public class CalendarFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
// Inflate the layout for this fragment // Inflate the layout for this fragment
view= inflater.inflate(R.layout.fragment_calendar, container, false); view = inflater.inflate(R.layout.fragment_calendar, container, false);
final CalendarView simpleCalendarView = (CalendarView) view.findViewById(R.id.simpleCalendarView); // get the reference of CalendarView final CalendarView simpleCalendarView = (CalendarView) view.findViewById(R.id.simpleCalendarView); // get the reference of CalendarView
simpleCalendarView.setFirstDayOfWeek(1); // set Sunday as the first day of the week simpleCalendarView.setFirstDayOfWeek(1); // set Sunday as the first day of the week
...@@ -40,18 +38,13 @@ public class CalendarFragment extends Fragment { ...@@ -40,18 +38,13 @@ public class CalendarFragment extends Fragment {
public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) { public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {
if(toast!=null) if (toast != null) {
{
toast.cancel(); toast.cancel();
} }
toast=Toast.makeText(getContext(), "Date: ("+dayOfMonth+"/"+(month+1)+"/"+year+")", Toast.LENGTH_LONG); toast = Toast.makeText(getContext(), "Date: (" + dayOfMonth + "/" + (month + 1) + "/" + year + ")", Toast.LENGTH_LONG);
toast.show(); toast.show();
} }
}); });
return view; return view;
......
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" /> android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
<path android:fillColor="#FF000000" <path
android:fillColor="#FF000000"
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" /> android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" /> android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" /> android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
</vector> </vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" /> android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" /> android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> android:width="24dp"
<path android:fillColor="#FF000000" android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" /> android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
</vector> </vector>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<shape android:shape="rectangle" > <shape android:shape="rectangle">
<corners android:radius="50dip" /> <corners android:radius="50dip" />
<stroke android:width="0dip" android:color="#667162" /> <stroke android:width="0dip" android:color="#667162" />
<gradient android:angle="-90" android:startColor="#FFEA00" android:endColor="#FFEA00" /> <gradient android:angle="-90" android:endColor="#FFEA00" android:startColor="#FFEA00" />
</shape> </shape>
</item> </item>
</selector> </selector>
\ No newline at end of file
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <shape xmlns:android="http://schemas.android.com/apk/res/android"
<gradient android:angle="135" android:centerColor="#009688" android:endColor="#00695C" android:shape="rectangle">
android:startColor="#4DB6AC" android:type="linear" /> <gradient
android:angle="135"
android:centerColor="#009688"
android:endColor="#00695C"
android:startColor="#4DB6AC"
android:type="linear" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<Button
<Button android:id="@+id/guest_login"
android:id="@+id/guest_login" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="48dp"
android:layout_height="48dp" android:layout_gravity="center"
android:layout_gravity="center" android:text="Guest Login" />
android:text="Guest Login"
/> <Button
android:id="@+id/ldap_login"
<Button android:layout_width="wrap_content"
android:id="@+id/ldap_login" android:layout_height="48dp"
android:layout_width="wrap_content" android:layout_gravity="center"
android:layout_height="48dp" android:text="LDAP login" />
android:layout_gravity="center"
android:text="LDAP login"
/>
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawer_layout"
android:fitsSystemWindows="true" tools:openDrawer="start"> android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include layout="@layout/app_bar_main" android:layout_width="match_parent" <include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<android.support.design.widget.NavigationView android:id="@+id/nav_view" <android.support.design.widget.NavigationView
android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/nav_view"
android:layout_gravity="start" android:fitsSystemWindows="true" android:layout_width="wrap_content"
app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout> </android.support.v4.widget.DrawerLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent" tools:context="in.ac.iitb.gymkhana.iitbapp.MainActivity"> android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.MainActivity">
<android.support.design.widget.AppBarLayout android:layout_width="match_parent" <android.support.design.widget.AppBarLayout
android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar" <android.support.v7.widget.Toolbar
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:id="@+id/toolbar"
android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" /> <include layout="@layout/content_main" />
<android.support.design.widget.FloatingActionButton android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout_for_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/constraintlayout_for_fragment"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="in.ac.iitb.gymkhana.iitbapp.MainActivity" tools:context="in.ac.iitb.gymkhana.iitbapp.MainActivity"
tools:showIn="@layout/app_bar_main" /> tools:showIn="@layout/app_bar_main" />
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" android:background="#E0E0E0"
android:theme="@style/CalendarTheme" android:theme="@style/CalendarTheme">
android:background="#E0E0E0">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragment layout -->
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="60dp"
android:background="#00BCD4"/> android:background="#00BCD4" />
<CalendarView <CalendarView
android:id="@+id/simpleCalendarView" android:id="@+id/simpleCalendarView"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:focusedMonthDateColor="#000000" android:focusedMonthDateColor="#000000"
android:unfocusedMonthDateColor="#FFFFFF"
android:maxDate="01/01/2019" android:maxDate="01/01/2019"
android:minDate="01/01/2017"/> android:minDate="01/01/2017"
android:unfocusedMonthDateColor="#FFFFFF" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@android:color/darker_gray" android:layout_below="@id/simpleCalendarView"
android:layout_marginTop="19.5dp"
android:layout_marginBottom="19.5dp" android:layout_marginBottom="19.5dp"
android:layout_below="@id/simpleCalendarView"/> android:layout_marginTop="19.5dp"
android:background="@android:color/darker_gray" />
<TextView <TextView
android:layout_width="120dp" android:layout_width="120dp"
android:layout_centerHorizontal="true"
android:layout_height="40dp" android:layout_height="40dp"
android:text="# Events Today"
android:gravity="center"
android:layout_below="@id/simpleCalendarView" android:layout_below="@id/simpleCalendarView"
android:background="@drawable/round_text_box"/> android:layout_centerHorizontal="true"
android:background="@drawable/round_text_box"
android:gravity="center"
android:text="# Events Today" />
</RelativeLayout> </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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"> tools:context="in.ac.iitb.gymkhana.iitbapp.fragments.MapFragment">
<fragment <fragment
android:id="@+id/viewMap" android:id="@+id/viewMap"
android:layout_width="match_parent" android:name="com.google.android.gms.maps.SupportMapFragment"
android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
map:cameraZoom="18" map:cameraZoom="18" />
/>
</FrameLayout> </FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="@dimen/nav_header_height" android:background="@drawable/side_nav_bar" android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/side_nav_bar"
android:gravity="bottom" android:gravity="bottom"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark"> android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView android:id="@+id/imageView" android:layout_width="wrap_content" <ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing" app:srcCompat="@mipmap/ic_launcher_round" /> android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_launcher_round" />
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <TextView
android:paddingTop="@dimen/nav_header_vertical_spacing" android:text="Android Studio" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Android Studio"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView android:id="@+id/textView" android:layout_width="wrap_content" <TextView
android:layout_height="wrap_content" android:text="android.studio@android.com" /> android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="android.studio@android.com" />
</LinearLayout> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" tools:showIn="navigation_view"> xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view">
<!--TODO Update icons--> <!--TODO Update icons-->
<group android:checkableBehavior="single"> <group android:checkableBehavior="single">
<item android:id="@+id/nav_feed" android:icon="@drawable/ic_feed" <item
android:id="@+id/nav_feed"
android:icon="@drawable/ic_feed"
android:title="Feed" /> android:title="Feed" />
<item android:id="@+id/nav_my_events" android:icon="@drawable/ic_event" <item
android:id="@+id/nav_my_events"
android:icon="@drawable/ic_event"
android:title="My Events" /> android:title="My Events" />
<item android:id="@+id/nav_pt_cell" android:icon="@drawable/ic_pt" <item
android:id="@+id/nav_pt_cell"
android:icon="@drawable/ic_pt"
android:title="PT Cell" /> android:title="PT Cell" />
<item android:id="@+id/nav_mess_menu" android:icon="@drawable/ic_mess_menu" <item
android:id="@+id/nav_mess_menu"
android:icon="@drawable/ic_mess_menu"
android:title="Mess Menu" /> android:title="Mess Menu" />
<item android:id="@+id/nav_gc_rankings" android:icon="@drawable/ic_poll" <item
android:id="@+id/nav_gc_rankings"
android:icon="@drawable/ic_poll"
android:title="GC Rankings" /> android:title="GC Rankings" />
<item android:id="@+id/nav_calendar" android:icon="@drawable/ic_calendar" <item
android:id="@+id/nav_calendar"
android:icon="@drawable/ic_calendar"
android:title="Calendar" /> android:title="Calendar" />
<item android:id="@+id/nav_timetable" android:icon="@drawable/ic_timetable" <item
android:id="@+id/nav_timetable"
android:icon="@drawable/ic_timetable"
android:title="Timetable" /> android:title="Timetable" />
<item android:id="@+id/nav_cms" android:icon="@drawable/ic_contacts" <item
android:id="@+id/nav_cms"
android:icon="@drawable/ic_contacts"
android:title="CMS" /> android:title="CMS" />
<item android:id="@+id/nav_map" android:icon="@drawable/ic_map" <item
android:id="@+id/nav_map"
android:icon="@drawable/ic_map"
android:title="Map" /> android:title="Map" />
</group> </group>
<item android:title="Communicate"> <item android:title="Communicate">
<menu> <menu>
<item android:id="@+id/nav_contacts" android:icon="@drawable/ic_phone" <item
android:id="@+id/nav_contacts"
android:icon="@drawable/ic_phone"
android:title="Contacts" /> android:title="Contacts" />
<item android:id="@+id/nav_about" android:icon="@drawable/ic_about" <item
android:id="@+id/nav_about"
android:icon="@drawable/ic_about"
android:title="About" /> android:title="About" />
</menu> </menu>
</item> </item>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings" android:orderInCategory="100" <item
android:title="@string/action_settings" app:showAsAction="never" /> android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu> </menu>
<resources> <resources>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#81D2CB</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#44C0CA</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#ECF833</color>
<color name="colorCalendarWeek">#000000</color> <color name="colorCalendarWeek">#000000</color>
</resources> </resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources>
<item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item> <item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>
<item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item> <item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>
<item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item> <item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>
......
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
...@@ -7,11 +7,14 @@ ...@@ -7,11 +7,14 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="CalendarTheme" parent="@style/AppTheme.NoActionBar"> <style name="CalendarTheme" parent="@style/AppTheme.NoActionBar">
......
...@@ -2,7 +2,7 @@ package in.ac.iitb.gymkhana.iitbapp; ...@@ -2,7 +2,7 @@ package in.ac.iitb.gymkhana.iitbapp;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
/** /**
* Example local unit test, which will execute on the development machine (host). * Example local unit test, which will execute on the development machine (host).
......
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