Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
f8321f3e
Commit
f8321f3e
authored
Jun 07, 2017
by
Mrunzzz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/unstablebrainiac/IITB-App
parents
2517ae74
b8dc6615
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
388 additions
and
315 deletions
+388
-315
.idea/vcs.xml
.idea/vcs.xml
+0
-6
app/src/androidTest/java/in/ac/iitb/gymkhana/iitbapp/ExampleInstrumentedTest.java
.../in/ac/iitb/gymkhana/iitbapp/ExampleInstrumentedTest.java
+1
-1
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+14
-6
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
.../main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
+120
-120
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
...c/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
+52
-51
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
.../ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
+4
-11
app/src/main/res/drawable-v21/ic_menu_camera.xml
app/src/main/res/drawable-v21/ic_menu_camera.xml
+9
-4
app/src/main/res/drawable-v21/ic_menu_gallery.xml
app/src/main/res/drawable-v21/ic_menu_gallery.xml
+7
-3
app/src/main/res/drawable-v21/ic_menu_manage.xml
app/src/main/res/drawable-v21/ic_menu_manage.xml
+7
-3
app/src/main/res/drawable-v21/ic_menu_send.xml
app/src/main/res/drawable-v21/ic_menu_send.xml
+8
-3
app/src/main/res/drawable-v21/ic_menu_share.xml
app/src/main/res/drawable-v21/ic_menu_share.xml
+7
-3
app/src/main/res/drawable-v21/ic_menu_slideshow.xml
app/src/main/res/drawable-v21/ic_menu_slideshow.xml
+7
-3
app/src/main/res/drawable/round_text_box.xml
app/src/main/res/drawable/round_text_box.xml
+2
-2
app/src/main/res/drawable/side_nav_bar.xml
app/src/main/res/drawable/side_nav_bar.xml
+8
-3
app/src/main/res/layout/activity_login.xml
app/src/main/res/layout/activity_login.xml
+18
-22
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_main.xml
+17
-8
app/src/main/res/layout/app_bar_main.xml
app/src/main/res/layout/app_bar_main.xml
+15
-14
app/src/main/res/layout/content_main.xml
app/src/main/res/layout/content_main.xml
+1
-1
app/src/main/res/layout/fragment_calendar.xml
app/src/main/res/layout/fragment_calendar.xml
+13
-14
app/src/main/res/layout/fragment_map.xml
app/src/main/res/layout/fragment_map.xml
+7
-8
app/src/main/res/layout/nav_header_main.xml
app/src/main/res/layout/nav_header_main.xml
+21
-9
app/src/main/res/menu/activity_main_drawer.xml
app/src/main/res/menu/activity_main_drawer.xml
+35
-12
app/src/main/res/menu/main.xml
app/src/main/res/menu/main.xml
+5
-2
app/src/main/res/values-v21/styles.xml
app/src/main/res/values-v21/styles.xml
+1
-0
app/src/main/res/values/colors.xml
app/src/main/res/values/colors.xml
+3
-3
app/src/main/res/values/drawables.xml
app/src/main/res/values/drawables.xml
+1
-1
app/src/main/res/values/styles.xml
app/src/main/res/values/styles.xml
+4
-1
app/src/test/java/in/ac/iitb/gymkhana/iitbapp/ExampleUnitTest.java
...est/java/in/ac/iitb/gymkhana/iitbapp/ExampleUnitTest.java
+1
-1
No files found.
.idea/vcs.xml
deleted
100644 → 0
View file @
2517ae74
<?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
app/src/androidTest/java/in/ac/iitb/gymkhana/iitbapp/ExampleInstrumentedTest.java
View file @
f8321f3e
...
...
@@ -7,7 +7,7 @@ import android.support.test.runner.AndroidJUnit4;
import
org.junit.Test
;
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.
...
...
app/src/main/AndroidManifest.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"in.ac.iitb.gymkhana.iitbapp"
>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<application
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<application
android:allowBackup=
"true"
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
android:name=
"com.google.android.gms.version"
android:value=
"@integer/google_play_services_version"
/>
...
...
@@ -14,7 +19,10 @@
<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"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -25,8 +33,8 @@
<activity
android:name=
".LoginActivity"
>
<intent-filter>
<action
android:name=
"HANDLE_AUTHORIZATION_RESPONSE"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<action
android:name=
"HANDLE_AUTHORIZATION_RESPONSE"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
</intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
View file @
f8321f3e
...
...
@@ -6,26 +6,22 @@ import android.app.PendingIntent;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.Toast
;
import
net.openid.appauth.AuthState
;
import
net.openid.appauth.AuthorizationException
;
import
net.openid.appauth.AuthorizationRequest
;
import
net.openid.appauth.AuthorizationResponse
;
import
net.openid.appauth.AuthorizationService
;
import
net.openid.appauth.AuthorizationServiceConfiguration
;
import
net.openid.appauth.TokenResponse
;
import
static
android
.
R
.
attr
.
action
;
public
class
LoginActivity
extends
AppCompatActivity
{
public
class
LoginActivity
extends
AppCompatActivity
{
private
static
final
String
TAG
=
"LoginActivity"
;
private
final
String
clientId
=
"pFcDDWtUUfzlAX2ibriV25lm1J2m92O5ynfT4SYk"
;
private
final
String
clientSecret
=
"k56GXiN1qB4Dt7CnTVWjuwLJyWntNulitWOkL7Wddr6JHPiHqIZgSfgUplO6neTqumVr32zA14XgQmkuoC8y6y9jnaQT9tKDsq4jQklRb8MQNQglQ1H4YrmqOwPfaNyO"
;
...
...
@@ -56,12 +52,14 @@ import static android.R.attr.action;
guestLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
//TODO This is for debug purposes, change once SSO is implemented
Intent
intent
=
new
Intent
(
LoginActivity
.
this
,
MainActivity
.
class
);
startActivity
(
intent
);
}
});
}
@Override
protected
void
onNewIntent
(
Intent
intent
)
{
...
...
@@ -70,16 +68,16 @@ import static android.R.attr.action;
private
void
checkIntent
(
@Nullable
Intent
intent
)
{
if
(
intent
!=
null
)
{
Log
.
d
(
TAG
,
"Intent Received"
);
Log
.
d
(
TAG
,
"Intent Received"
);
String
action
=
intent
.
getAction
();
switch
(
action
)
{
case
"HANDLE_AUTHORIZATION_RESPONSE"
:
{
case
"HANDLE_AUTHORIZATION_RESPONSE"
:
{
handleAuthorizationResponse
(
intent
);
}
break
;
default
:
Log
.
d
(
TAG
,
intent
.
getAction
());
default
:
Log
.
d
(
TAG
,
intent
.
getAction
());
}
}
...
...
@@ -94,7 +92,7 @@ import static android.R.attr.action;
@Override
protected
void
onResume
()
{
super
.
onResume
();
Log
.
d
(
TAG
,
"In Resume"
);
Log
.
d
(
TAG
,
"In Resume"
);
}
@Override
...
...
@@ -102,14 +100,15 @@ import static android.R.attr.action;
super
.
onDestroy
();
mAuthService
.
dispose
();
}
private
void
handleAuthorizationResponse
(
@NonNull
Intent
intent
)
{
AuthorizationResponse
response
=
AuthorizationResponse
.
fromIntent
(
intent
);
AuthorizationException
error
=
AuthorizationException
.
fromIntent
(
intent
);
if
(
response
!=
null
)
{
Log
.
d
(
TAG
,
"Received AuthorizationResponse: "
+
"AuthCode: "
+
response
.
authorizationCode
);
Log
.
d
(
TAG
,
"Received AuthorizationResponse: "
+
"AuthCode: "
+
response
.
authorizationCode
);
Toast
.
makeText
(
this
,
"AuthCode: "
+
response
.
authorizationCode
,
Toast
.
LENGTH_SHORT
)
"AuthCode: "
+
response
.
authorizationCode
,
Toast
.
LENGTH_SHORT
)
.
show
();
}
else
{
Log
.
i
(
TAG
,
"Authorization failed: "
+
error
.
getMessage
());
...
...
@@ -143,6 +142,7 @@ import static android.R.attr.action;
.
setToolbarColor
(
getCustomTabColor
())
.
build
());
}
//Todo: Change the color of Chrome custom tabs based on app theme color
@TargetApi
(
Build
.
VERSION_CODES
.
M
)
@SuppressWarnings
(
"deprecation"
)
...
...
@@ -155,5 +155,5 @@ import static android.R.attr.action;
}
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
View file @
f8321f3e
...
...
@@ -16,20 +16,19 @@ import android.view.Menu;
import
android.view.MenuItem
;
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.
Map
Fragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragments.
Contacts
Fragment
;
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.MapFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragments.MessMenuFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragments.MyEventsFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragments.PTCellFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragments.TimetableFragment
;
public
class
MainActivity
extends
AppCompatActivity
implements
NavigationView
.
OnNavigationItemSelectedListener
{
...
...
@@ -40,15 +39,6 @@ public class MainActivity extends AppCompatActivity
Toolbar
toolbar
=
(
Toolbar
)
findViewById
(
R
.
id
.
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
);
ActionBarDrawerToggle
toggle
=
new
ActionBarDrawerToggle
(
this
,
drawer
,
toolbar
,
R
.
string
.
navigation_drawer_open
,
R
.
string
.
navigation_drawer_close
);
...
...
@@ -97,40 +87,51 @@ public class MainActivity extends AppCompatActivity
// Handle navigation view item clicks here.
int
id
=
item
.
getItemId
();
if
(
id
==
R
.
id
.
nav_feed
)
{
switch
(
id
)
{
case
R
.
id
.
nav_feed
:
FeedFragment
feedFragment
=
new
FeedFragment
();
updateFragment
(
feedFragment
);
}
else
if
(
id
==
R
.
id
.
nav_my_events
)
{
break
;
case
R
.
id
.
nav_my_events
:
MyEventsFragment
myeventsFragment
=
new
MyEventsFragment
();
updateFragment
(
myeventsFragment
);
}
else
if
(
id
==
R
.
id
.
nav_pt_cell
)
{
break
;
case
R
.
id
.
nav_pt_cell
:
PTCellFragment
ptcellFragment
=
new
PTCellFragment
();
updateFragment
(
ptcellFragment
);
}
else
if
(
id
==
R
.
id
.
nav_mess_menu
)
{
break
;
case
R
.
id
.
nav_mess_menu
:
MessMenuFragment
messmenuFragment
=
new
MessMenuFragment
();
updateFragment
(
messmenuFragment
);
}
else
if
(
id
==
R
.
id
.
nav_gc_rankings
)
{
break
;
case
R
.
id
.
nav_gc_rankings
:
GCRankingsFragment
gcrankingsFragment
=
new
GCRankingsFragment
();
updateFragment
(
gcrankingsFragment
);
}
else
if
(
id
==
R
.
id
.
nav_calendar
)
{
break
;
case
R
.
id
.
nav_calendar
:
CalendarFragment
calendarFragment
=
new
CalendarFragment
();
updateFragment
(
calendarFragment
);
}
else
if
(
id
==
R
.
id
.
nav_cms
)
{
break
;
case
R
.
id
.
nav_cms
:
CMSFragment
cmsFragment
=
new
CMSFragment
();
updateFragment
(
cmsFragment
);
}
else
if
(
id
==
R
.
id
.
nav_timetable
)
{
break
;
case
R
.
id
.
nav_timetable
:
TimetableFragment
timetableFragment
=
new
TimetableFragment
();
updateFragment
(
timetableFragment
);
}
else
if
(
id
==
R
.
id
.
nav_map
)
{
break
;
case
R
.
id
.
nav_map
:
MapFragment
mapFragment
=
new
MapFragment
();
updateFragment
(
mapFragment
);
}
else
if
(
id
==
R
.
id
.
nav_contacts
)
{
break
;
case
R
.
id
.
nav_contacts
:
ContactsFragment
contactsFragment
=
new
ContactsFragment
();
updateFragment
(
contactsFragment
);
}
else
if
(
id
==
R
.
id
.
nav_about
)
{
break
;
case
R
.
id
.
nav_about
:
AboutFragment
aboutFragment
=
new
AboutFragment
();
updateFragment
(
aboutFragment
);
break
;
}
DrawerLayout
drawer
=
(
DrawerLayout
)
findViewById
(
R
.
id
.
drawer_layout
);
...
...
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
View file @
f8321f3e
package
in.ac.iitb.gymkhana.iitbapp.fragments
;
import
android.graphics.Color
;
import
android.graphics.drawable.GradientDrawable
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.CalendarView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
...
...
@@ -21,6 +18,7 @@ public class CalendarFragment extends Fragment {
private
View
view
;
private
Toast
toast
;
public
CalendarFragment
()
{
// Required empty public constructor
}
...
...
@@ -30,7 +28,7 @@ public class CalendarFragment extends Fragment {
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// 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
simpleCalendarView
.
setFirstDayOfWeek
(
1
);
// set Sunday as the first day of the week
...
...
@@ -40,18 +38,13 @@ public class CalendarFragment extends Fragment {
public
void
onSelectedDayChange
(
CalendarView
view
,
int
year
,
int
month
,
int
dayOfMonth
)
{
if
(
toast
!=
null
)
{
if
(
toast
!=
null
)
{
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
();
}
});
return
view
;
...
...
app/src/main/res/drawable-v21/ic_menu_camera.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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"
/>
<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"
/>
</vector>
app/src/main/res/drawable-v21/ic_menu_gallery.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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"
/>
</vector>
app/src/main/res/drawable-v21/ic_menu_manage.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable-v21/ic_menu_send.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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>
app/src/main/res/drawable-v21/ic_menu_share.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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"
/>
</vector>
app/src/main/res/drawable-v21/ic_menu_slideshow.xml
View file @
f8321f3e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
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"
/>
</vector>
app/src/main/res/drawable/round_text_box.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"50dip"
/>
<stroke
android:width=
"0dip"
android:color=
"#667162"
/>
<gradient
android:angle=
"-90"
android:
startColor=
"#FFEA00"
android:end
Color=
"#FFEA00"
/>
<gradient
android:angle=
"-90"
android:
endColor=
"#FFEA00"
android:start
Color=
"#FFEA00"
/>
</shape>
</item>
</selector>
\ No newline at end of file
app/src/main/res/drawable/side_nav_bar.xml
View file @
f8321f3e
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"135"
android:centerColor=
"#009688"
android:endColor=
"#00695C"
android:startColor=
"#4DB6AC"
android:type=
"linear"
/>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"135"
android:centerColor=
"#009688"
android:endColor=
"#00695C"
android:startColor=
"#4DB6AC"
android:type=
"linear"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_login.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<Button
...
...
@@ -11,17 +10,14 @@
android:layout_width=
"wrap_content"
android:layout_height=
"48dp"
android:layout_gravity=
"center"
android:text=
"Guest Login"
/>
android:text=
"Guest Login"
/>
<Button
android:id=
"@+id/ldap_login"
android:layout_width=
"wrap_content"
android:layout_height=
"48dp"
android:layout_gravity=
"center"
android:text=
"LDAP login"
/>
android:text=
"LDAP login"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/drawer_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
tools:openDrawer=
"start"
>
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/drawer_layout"
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.support.design.widget.NavigationView
android:id=
"@+id/nav_view"
android:layout_width=
"wrap_content"
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.design.widget.NavigationView
android:id=
"@+id/nav_view"
android:layout_width=
"wrap_content"
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>
app/src/main/res/layout/app_bar_main.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"in.ac.iitb.gymkhana.iitbapp.MainActivity"
>
xmlns:tools=
"http://schemas.android.com/tools"
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:layout_height=
"wrap_content"
android:theme=
"@style/AppTheme.AppBarOverlay"
>
<android.support.design.widget.AppBarLayout
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:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
<android.support.v7.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<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>
app/src/main/res/layout/content_main.xml
View file @
f8321f3e
...
...
@@ -2,9 +2,9 @@
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/constraintlayout_for_fragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/constraintlayout_for_fragment"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
tools:context=
"in.ac.iitb.gymkhana.iitbapp.MainActivity"
tools:showIn=
"@layout/app_bar_main"
/>
app/src/main/res/layout/fragment_calendar.xml
View file @
f8321f3e
<RelativeLayout
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:app=
"http://schemas.android.com/apk/res-auto"
android:theme=
"@style/CalendarTheme"
android:background=
"#E0E0E0"
>
android:background=
"#E0E0E0"
android:theme=
"@style/CalendarTheme"
>
<!-- TODO: Update blank fragment layout -->
<View
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:background=
"#00BCD4"
/>
android:background=
"#00BCD4"
/>
<CalendarView
android:id=
"@+id/simpleCalendarView"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:focusedMonthDateColor=
"#000000"
android:unfocusedMonthDateColor=
"#FFFFFF"
android:maxDate=
"01/01/2019"
android:minDate=
"01/01/2017"
/>
android:minDate=
"01/01/2017"
android:unfocusedMonthDateColor=
"#FFFFFF"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@android:color/darker_gray"
android:layout_marginTop=
"19.5dp"
android:layout_below=
"@id/simpleCalendarView"
android:layout_marginBottom=
"19.5dp"
android:layout_below=
"@id/simpleCalendarView"
/>
android:layout_marginTop=
"19.5dp"
android:background=
"@android:color/darker_gray"
/>
<TextView
android:layout_width=
"120dp"
android:layout_centerHorizontal=
"true"
android:layout_height=
"40dp"
android:text=
"# Events Today"
android:gravity=
"center"
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>
app/src/main/res/layout/fragment_map.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<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"
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
<fragment
android:id=
"@+id/viewMap"
android:layout_width=
"match_parent"
android:name=
"com.google.android.gms.maps.SupportMapFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
map:cameraZoom=
"18"
/>
map:cameraZoom=
"18"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/nav_header_main.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/nav_header_height"
android:background=
"@drawable/side_nav_bar"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/nav_header_height"
android:background=
"@drawable/side_nav_bar"
android:gravity=
"bottom"
android:orientation=
"vertical"
android:paddingBottom=
"@dimen/activity_vertical_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"
>
<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: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"
android:paddingTop=
"@dimen/nav_header_vertical_spacing"
android:text=
"Android Studio"
<TextView
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"
/>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"android.studio@android.com"
/>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"android.studio@android.com"
/>
</LinearLayout>
app/src/main/res/menu/activity_main_drawer.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<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-->
<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"
/>
<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"
/>
<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"
/>
<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"
/>
<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"
/>
<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"
/>
<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"
/>
<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"
/>
<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"
/>
</group>
<item
android:title=
"Communicate"
>
<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"
/>
<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"
/>
</menu>
</item>
...
...
app/src/main/res/menu/main.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_settings"
android:orderInCategory=
"100"
android:title=
"@string/action_settings"
app:showAsAction=
"never"
/>
<item
android:id=
"@+id/action_settings"
android:orderInCategory=
"100"
android:title=
"@string/action_settings"
app:showAsAction=
"never"
/>
</menu>
app/src/main/res/values-v21/styles.xml
View file @
f8321f3e
<resources>
<style
name=
"AppTheme.NoActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
...
...
app/src/main/res/values/colors.xml
View file @
f8321f3e
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"colorPrimary"
>
#
3F51B5
</color>
<color
name=
"colorPrimaryDark"
>
#
303F9F
</color>
<color
name=
"colorAccent"
>
#
FF4081
</color>
<color
name=
"colorPrimary"
>
#
81D2CB
</color>
<color
name=
"colorPrimaryDark"
>
#
44C0CA
</color>
<color
name=
"colorAccent"
>
#
ECF833
</color>
<color
name=
"colorCalendarWeek"
>
#000000
</color>
</resources>
app/src/main/res/values/drawables.xml
View file @
f8321f3e
<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_gallery"
type=
"drawable"
>
@android:drawable/ic_menu_gallery
</item>
<item
name=
"ic_menu_slideshow"
type=
"drawable"
>
@android:drawable/ic_menu_slideshow
</item>
...
...
app/src/main/res/values/styles.xml
View file @
f8321f3e
<resources
xmlns:tools=
"http://schemas.android.com/tools"
>
<resources>
<!-- Base application theme. -->
<style
name=
"AppTheme"
parent=
"Theme.AppCompat.Light.DarkActionBar"
>
...
...
@@ -7,11 +7,14 @@
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
</style>
<style
name=
"AppTheme.NoActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
</style>
<style
name=
"AppTheme.AppBarOverlay"
parent=
"ThemeOverlay.AppCompat.Dark.ActionBar"
/>
<style
name=
"AppTheme.PopupOverlay"
parent=
"ThemeOverlay.AppCompat.Light"
/>
<style
name=
"CalendarTheme"
parent=
"@style/AppTheme.NoActionBar"
>
...
...
app/src/test/java/in/ac/iitb/gymkhana/iitbapp/ExampleUnitTest.java
View file @
f8321f3e
...
...
@@ -2,7 +2,7 @@ package in.ac.iitb.gymkhana.iitbapp;
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).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment