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
36176be4
Commit
36176be4
authored
Jul 06, 2018
by
Sajal Narang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/unstablebrainiac/IITB-App
parents
d39aff68
f0e37858
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
159 additions
and
57 deletions
+159
-57
.idea/caches/build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
app/src/main/java/app/insti/Constants.java
app/src/main/java/app/insti/Constants.java
+2
-0
app/src/main/java/app/insti/MainActivity.java
app/src/main/java/app/insti/MainActivity.java
+21
-9
app/src/main/java/app/insti/fragment/AboutFragment.java
app/src/main/java/app/insti/fragment/AboutFragment.java
+57
-39
app/src/main/java/app/insti/fragment/AddEventFragment.java
app/src/main/java/app/insti/fragment/AddEventFragment.java
+4
-0
app/src/main/java/app/insti/fragment/BodyFragment.java
app/src/main/java/app/insti/fragment/BodyFragment.java
+4
-0
app/src/main/java/app/insti/fragment/CalendarFragment.java
app/src/main/java/app/insti/fragment/CalendarFragment.java
+7
-1
app/src/main/java/app/insti/fragment/EventFragment.java
app/src/main/java/app/insti/fragment/EventFragment.java
+4
-0
app/src/main/java/app/insti/fragment/FeedFragment.java
app/src/main/java/app/insti/fragment/FeedFragment.java
+6
-1
app/src/main/java/app/insti/fragment/MapFragment.java
app/src/main/java/app/insti/fragment/MapFragment.java
+5
-0
app/src/main/java/app/insti/fragment/MessMenuFragment.java
app/src/main/java/app/insti/fragment/MessMenuFragment.java
+4
-0
app/src/main/java/app/insti/fragment/MyEventsFragment.java
app/src/main/java/app/insti/fragment/MyEventsFragment.java
+6
-1
app/src/main/java/app/insti/fragment/NewsFragment.java
app/src/main/java/app/insti/fragment/NewsFragment.java
+4
-0
app/src/main/java/app/insti/fragment/NotificationsFragment.java
...c/main/java/app/insti/fragment/NotificationsFragment.java
+4
-0
app/src/main/java/app/insti/fragment/PlacementBlogFragment.java
...c/main/java/app/insti/fragment/PlacementBlogFragment.java
+4
-0
app/src/main/java/app/insti/fragment/ProfileFragment.java
app/src/main/java/app/insti/fragment/ProfileFragment.java
+5
-0
app/src/main/java/app/insti/fragment/QLinksFragment.java
app/src/main/java/app/insti/fragment/QLinksFragment.java
+7
-0
app/src/main/java/app/insti/fragment/SettingsFragment.java
app/src/main/java/app/insti/fragment/SettingsFragment.java
+4
-0
app/src/main/java/app/insti/fragment/TrainingBlogFragment.java
...rc/main/java/app/insti/fragment/TrainingBlogFragment.java
+4
-0
app/src/main/res/layout/fragment_about.xml
app/src/main/res/layout/fragment_about.xml
+1
-1
app/src/main/res/layout/fragment_calendar.xml
app/src/main/res/layout/fragment_calendar.xml
+1
-1
app/src/main/res/layout/fragment_feed.xml
app/src/main/res/layout/fragment_feed.xml
+1
-1
app/src/main/res/layout/fragment_my_events.xml
app/src/main/res/layout/fragment_my_events.xml
+1
-1
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+3
-2
No files found.
.idea/caches/build_file_checksums.ser
View file @
36176be4
No preview for this file type
app/src/main/java/app/insti/Constants.java
View file @
36176be4
...
...
@@ -22,4 +22,6 @@ public class Constants {
public
static
final
int
STATUS_NOT_GOING
=
0
;
public
static
final
String
BODY_JSON
=
"body_json"
;
public
static
final
String
BODY_LIST_JSON
=
"body_list_json"
;
public
static
final
String
LOGIN_MESSAGE
=
"Please login to continue!"
;
}
app/src/main/java/app/insti/MainActivity.java
View file @
36176be4
...
...
@@ -208,20 +208,33 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
updateFragment
(
feedFragment
);
break
;
case
R
.
id
.
nav_my_events
:
if
(
session
.
isLoggedIn
())
{
MyEventsFragment
myeventsFragment
=
new
MyEventsFragment
();
updateFragment
(
myeventsFragment
);
}
else
{
Toast
.
makeText
(
this
,
Constants
.
LOGIN_MESSAGE
,
Toast
.
LENGTH_LONG
).
show
();
}
break
;
case
R
.
id
.
nav_news
:
NewsFragment
newsFragment
=
new
NewsFragment
();
updateFragment
(
newsFragment
);
break
;
case
R
.
id
.
nav_placement_blog
:
if
(
session
.
isLoggedIn
())
{
PlacementBlogFragment
placementBlogFragment
=
new
PlacementBlogFragment
();
updateFragment
(
placementBlogFragment
);
}
else
{
Toast
.
makeText
(
this
,
Constants
.
LOGIN_MESSAGE
,
Toast
.
LENGTH_LONG
).
show
();
}
break
;
case
R
.
id
.
nav_training_blog
:
if
(
session
.
isLoggedIn
())
{
TrainingBlogFragment
trainingBlogFragment
=
new
TrainingBlogFragment
();
updateFragment
(
trainingBlogFragment
);
}
else
{
Toast
.
makeText
(
this
,
Constants
.
LOGIN_MESSAGE
,
Toast
.
LENGTH_LONG
).
show
();
}
break
;
case
R
.
id
.
nav_mess_menu
:
MessMenuFragment
messMenuFragment
=
new
MessMenuFragment
();
...
...
@@ -317,9 +330,8 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
UnsafeOkHttpClient
.
getUnsafeOkHttpClient
(
getApplicationContext
())
)));
Picasso
built
=
builder
.
build
();
// TODO Set these to false before launch
built
.
setIndicatorsEnabled
(
true
);
built
.
setLoggingEnabled
(
true
);
built
.
setIndicatorsEnabled
(
false
);
built
.
setLoggingEnabled
(
false
);
Picasso
.
setSingletonInstance
(
built
);
}
...
...
app/src/main/java/app/insti/fragment/AboutFragment.java
View file @
36176be4
package
app.insti.fragment
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.squareup.picasso.Picasso
;
import
java.util.HashMap
;
import
java.util.Map
;
import
de.hdodenhof.circleimageview.CircleImageView
;
import
app.insti.R
;
...
...
@@ -35,44 +42,55 @@ public class AboutFragment extends BaseFragment {
@Override
public
void
onStart
()
{
super
.
onStart
();
CircleImageView
varunimg
=
getActivity
().
findViewById
(
R
.
id
.
varunimg
);
CircleImageView
sajalimg
=
getActivity
().
findViewById
(
R
.
id
.
sajalimg
);
CircleImageView
nihalimg
=
getActivity
().
findViewById
(
R
.
id
.
nihalimg
);
CircleImageView
ydidwaniaimg
=
getActivity
().
findViewById
(
R
.
id
.
ydidwaniaimg
);
CircleImageView
cheekuimg
=
getActivity
().
findViewById
(
R
.
id
.
cheekuimg
);
CircleImageView
sarthakimg
=
getActivity
().
findViewById
(
R
.
id
.
sarthakimg
);
CircleImageView
sohamimg
=
getActivity
().
findViewById
(
R
.
id
.
sohamimg
);
CircleImageView
mrunmayiimg
=
getActivity
().
findViewById
(
R
.
id
.
mrunmayiimg
);
CircleImageView
owaisimg
=
getActivity
().
findViewById
(
R
.
id
.
owaisimg
);
CircleImageView
hrushikeshimg
=
getActivity
().
findViewById
(
R
.
id
.
hrushikeshimg
);
CircleImageView
yashkhemimg
=
getActivity
().
findViewById
(
R
.
id
.
yashkhemimg
);
CircleImageView
bavishimg
=
getActivity
().
findViewById
(
R
.
id
.
bavishimg
);
CircleImageView
mayuimg
=
getActivity
().
findViewById
(
R
.
id
.
mayuimg
);
CircleImageView
tomarimg
=
getActivity
().
findViewById
(
R
.
id
.
tomarimg
);
CircleImageView
bijoyimg
=
getActivity
().
findViewById
(
R
.
id
.
bijoyimg
);
CircleImageView
dheerendraimg
=
getActivity
().
findViewById
(
R
.
id
.
dheerendraimg
);
CircleImageView
ranveerimg
=
getActivity
().
findViewById
(
R
.
id
.
ranveerimg
);
CircleImageView
amangourimg
=
getActivity
().
findViewById
(
R
.
id
.
amangourimg
);
CircleImageView
wnccimg
=
getActivity
().
findViewById
(
R
.
id
.
wnccimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/varun.jpg"
).
into
(
varunimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/sajal.jpg"
).
into
(
sajalimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/nihal.jpg"
).
into
(
nihalimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/ydidwania.jpg"
).
into
(
ydidwaniaimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/cheeku.jpg"
).
into
(
cheekuimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/sarthak.jpg"
).
into
(
sarthakimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/soham.jpg"
).
into
(
sohamimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/mrunmayi.jpg"
).
into
(
mrunmayiimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/owais.jpg"
).
into
(
owaisimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/hrushikesh.jpg"
).
into
(
hrushikeshimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/yashkhem.jpg"
).
into
(
yashkhemimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/bavish.jpg"
).
into
(
bavishimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/mayu.jpg"
).
into
(
mayuimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/tomar.jpg"
).
into
(
tomarimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/bijoy.jpg"
).
into
(
bijoyimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/dheerendra.jpg"
).
into
(
dheerendraimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/ranveer.jpg"
).
into
(
ranveerimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/amangour.jpg"
).
into
(
amangourimg
);
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/wncc.jpg"
).
into
(
wnccimg
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"About"
);
/* Map CircleImageView ids to image URLs */
final
Map
<
Integer
,
String
>
team
=
new
HashMap
<
Integer
,
String
>()
{{
put
(
R
.
id
.
varunimg
,
"varun.jpg"
);
put
(
R
.
id
.
sajalimg
,
"sajal.jpg"
);
put
(
R
.
id
.
nihalimg
,
"nihal.jpg"
);
put
(
R
.
id
.
ydidwaniaimg
,
"ydidwania.jpg"
);
put
(
R
.
id
.
cheekuimg
,
"cheeku.jpg"
);
put
(
R
.
id
.
sarthakimg
,
"sarthak.jpg"
);
put
(
R
.
id
.
sohamimg
,
"soham.jpg"
);
put
(
R
.
id
.
mrunmayiimg
,
"mrunmayi.jpg"
);
put
(
R
.
id
.
owaisimg
,
"owais.jpg"
);
put
(
R
.
id
.
hrushikeshimg
,
"hrushikesh.jpg"
);
put
(
R
.
id
.
yashkhemimg
,
"yashkhem.jpg"
);
put
(
R
.
id
.
bavishimg
,
"bavish.jpg"
);
put
(
R
.
id
.
mayuimg
,
"mayu.jpg"
);
put
(
R
.
id
.
tomarimg
,
"tomar.jpg"
);
put
(
R
.
id
.
bijoyimg
,
"bijoy.jpg"
);
put
(
R
.
id
.
dheerendraimg
,
"dheerendra.jpg"
);
put
(
R
.
id
.
ranveerimg
,
"ranveer.jpg"
);
put
(
R
.
id
.
amangourimg
,
"amangour.jpg"
);
put
(
R
.
id
.
wnccimg
,
"wncc.jpg"
);
}};
/* Show team pics */
for
(
final
Map
.
Entry
<
Integer
,
String
>
entry
:
team
.
entrySet
())
{
CircleImageView
circleImageView
=
getActivity
().
findViewById
(
entry
.
getKey
());
Picasso
.
with
(
getContext
()).
load
(
"https://insti.app/team-pics/"
+
entry
.
getValue
()).
into
(
circleImageView
);
}
/* Map TextView ids to links */
final
Map
<
Integer
,
String
>
joinUs
=
new
HashMap
<
Integer
,
String
>()
{{;
put
(
R
.
id
.
django
,
"https://github.com/wncc/IITBapp"
);
put
(
R
.
id
.
android
,
"https://github.com/wncc/InstiApp"
);
put
(
R
.
id
.
angular
,
"https://github.com/pulsejet/iitb-app-angular"
);
}};
for
(
final
Map
.
Entry
<
Integer
,
String
>
entry
:
joinUs
.
entrySet
())
{
getActivity
().
findViewById
(
entry
.
getKey
()).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Uri
uriUrl
=
Uri
.
parse
(
entry
.
getValue
());
Intent
launchBrowser
=
new
Intent
(
Intent
.
ACTION_VIEW
,
uriUrl
);
startActivity
(
launchBrowser
);
}
});
}
}
}
app/src/main/java/app/insti/fragment/AddEventFragment.java
View file @
36176be4
...
...
@@ -15,6 +15,7 @@ import android.provider.MediaStore;
import
android.support.v4.app.ActivityCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.widget.ImageViewCompat
;
import
android.support.v7.widget.Toolbar
;
import
android.util.Base64
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
...
...
@@ -132,6 +133,9 @@ public class AddEventFragment extends BaseFragment {
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_add_event
,
container
,
false
);
ButterKnife
.
bind
(
this
,
view
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Add Event"
);
eventPictureImageView
=
view
.
findViewById
(
R
.
id
.
ib_eventImage
);
progressDialog
=
new
ProgressDialog
(
getContext
());
...
...
app/src/main/java/app/insti/fragment/BodyFragment.java
View file @
36176be4
...
...
@@ -10,6 +10,7 @@ import android.support.v4.app.FragmentTransaction;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -105,6 +106,9 @@ public class BodyFragment extends Fragment {
updateBody
();
}
});
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
min_body
.
getBodyName
());
}
private
void
updateBody
()
{
...
...
app/src/main/java/app/insti/fragment/CalendarFragment.java
View file @
36176be4
...
...
@@ -7,6 +7,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -61,6 +62,10 @@ public class CalendarFragment extends BaseFragment {
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_calendar
,
container
,
false
);
fab
=
(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Calendar"
);
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
...
...
@@ -88,7 +93,8 @@ public class CalendarFragment extends BaseFragment {
}
});
if
(((
MainActivity
)
getActivity
()).
createEventAccess
())
{
fab
.
setVisibility
(
View
.
VISIBLE
);
/* TODO: Uncomment the following line when Add Event is completed */
// fab.setVisibility(View.VISIBLE);
}
updateEvents
();
...
...
app/src/main/java/app/insti/fragment/EventFragment.java
View file @
36176be4
...
...
@@ -9,6 +9,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -82,6 +83,9 @@ public class EventFragment extends BaseFragment {
Log
.
d
(
TAG
,
"onStart: "
+
eventJson
);
event
=
new
Gson
().
fromJson
(
eventJson
,
Event
.
class
);
inflateViews
(
event
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
event
.
getEventName
());
}
private
void
inflateViews
(
final
Event
event
)
{
...
...
app/src/main/java/app/insti/fragment/FeedFragment.java
View file @
36176be4
...
...
@@ -11,6 +11,7 @@ import android.support.v4.app.FragmentTransaction;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -57,6 +58,9 @@ public class FeedFragment extends BaseFragment {
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_feed
,
container
,
false
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Feed"
);
fab
=
(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
feedSwipeRefreshLayout
=
view
.
findViewById
(
R
.
id
.
feed_swipe_refresh_layout
);
...
...
@@ -87,7 +91,8 @@ public class FeedFragment extends BaseFragment {
super
.
onStart
();
if
(((
MainActivity
)
getActivity
()).
createEventAccess
())
{
fab
.
setVisibility
(
View
.
VISIBLE
);
/* TODO: Uncomment the following line when Add Event is completed */
// fab.setVisibility(View.VISIBLE);
}
appDatabase
=
AppDatabase
.
getAppDatabase
(
getContext
());
...
...
app/src/main/java/app/insti/fragment/MapFragment.java
View file @
36176be4
...
...
@@ -16,6 +16,7 @@ import android.os.Bundle;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.v4.app.ActivityCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v7.widget.Toolbar
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -77,6 +78,10 @@ public class MapFragment extends BaseFragment implements OnMapReadyCallback, Loc
@Override
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Map"
);
locationButton
=
(
FloatingActionButton
)
getActivity
().
findViewById
(
R
.
id
.
location_button
);
locationButton
.
setImageResource
(
R
.
drawable
.
ic_my_location_black_24dp
);
locationButton
.
getDrawable
().
setColorFilter
(
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
colorPrimaryDark
),
PorterDuff
.
Mode
.
SRC_IN
);
...
...
app/src/main/java/app/insti/fragment/MessMenuFragment.java
View file @
36176be4
...
...
@@ -8,6 +8,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -60,6 +61,9 @@ public class MessMenuFragment extends BaseFragment {
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Mess Menu"
);
final
String
hostel
=
(
String
)
getArguments
().
get
(
Constants
.
USER_HOSTEL
);
displayMenu
(
hostel
);
...
...
app/src/main/java/app/insti/fragment/MyEventsFragment.java
View file @
36176be4
...
...
@@ -11,6 +11,7 @@ import android.support.v4.app.FragmentTransaction;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -48,6 +49,9 @@ public class MyEventsFragment extends BaseFragment {
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_my_events
,
container
,
false
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"My Events"
);
fab
=
(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -69,7 +73,8 @@ public class MyEventsFragment extends BaseFragment {
super
.
onStart
();
if
(((
MainActivity
)
getActivity
()).
createEventAccess
())
{
fab
.
setVisibility
(
View
.
VISIBLE
);
/* TODO: Uncomment the following line when Add Event is completed */
// fab.setVisibility(View.VISIBLE);
}
appDatabase
=
AppDatabase
.
getAppDatabase
(
getContext
());
...
...
app/src/main/java/app/insti/fragment/NewsFragment.java
View file @
36176be4
...
...
@@ -10,6 +10,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -55,6 +56,9 @@ public class NewsFragment extends BaseFragment {
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"News"
);
appDatabase
=
AppDatabase
.
getAppDatabase
(
getContext
());
new
NewsFragment
.
showNewsFromDB
().
execute
();
...
...
app/src/main/java/app/insti/fragment/NotificationsFragment.java
View file @
36176be4
...
...
@@ -5,6 +5,7 @@ import android.os.Bundle;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -43,6 +44,9 @@ public class NotificationsFragment extends BaseFragment {
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Notifications"
);
Bundle
bundle
=
getArguments
();
String
notificationsResponseJson
=
bundle
.
getString
(
Constants
.
NOTIFICATIONS_RESPONSE_JSON
);
NotificationsResponse
notificationsResponse
=
new
Gson
().
fromJson
(
notificationsResponseJson
,
NotificationsResponse
.
class
);
...
...
app/src/main/java/app/insti/fragment/PlacementBlogFragment.java
View file @
36176be4
...
...
@@ -10,6 +10,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -56,6 +57,9 @@ public class PlacementBlogFragment extends BaseFragment {
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Placement Blog"
);
appDatabase
=
AppDatabase
.
getAppDatabase
(
getContext
());
new
PlacementBlogFragment
.
showPlacementBlogFromDB
().
execute
();
...
...
app/src/main/java/app/insti/fragment/ProfileFragment.java
View file @
36176be4
...
...
@@ -8,6 +8,7 @@ import android.support.v4.app.FragmentTransaction;
import
android.support.v4.view.ViewPager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -54,6 +55,10 @@ public class ProfileFragment extends BaseFragment {
@Override
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Profile"
);
Bundle
bundle
=
getArguments
();
String
userID
=
bundle
.
getString
(
Constants
.
USER_ID
);
...
...
app/src/main/java/app/insti/fragment/QLinksFragment.java
View file @
36176be4
...
...
@@ -4,6 +4,7 @@ import android.content.Intent;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -20,6 +21,10 @@ public class QLinksFragment extends BaseFragment {
public
void
onStart
(){
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Quick Links"
);
TextView
CMS
=
getActivity
().
findViewById
(
R
.
id
.
button_CMS
);
TextView
CMSMaint
=
getActivity
().
findViewById
(
R
.
id
.
button_CMSMaint
);
TextView
CMSNet
=
getActivity
().
findViewById
(
R
.
id
.
button_CMSNet
);
...
...
@@ -38,6 +43,7 @@ public class QLinksFragment extends BaseFragment {
TextView
CAMP
=
getActivity
().
findViewById
(
R
.
id
.
button_CAMP
);
TextView
MSStore
=
getActivity
().
findViewById
(
R
.
id
.
button_MSStore
);
TextView
BigHome
=
getActivity
().
findViewById
(
R
.
id
.
button_BigHomeCloud
);
// TextView FTP = getActivity().findViewById(R.id.button_FTP);
TextView
Intercom
=
getActivity
().
findViewById
(
R
.
id
.
button_Intercom
);
TextView
Hospital
=
getActivity
().
findViewById
(
R
.
id
.
button_Hospital
);
TextView
VPN
=
getActivity
().
findViewById
(
R
.
id
.
button_VPN
);
...
...
@@ -60,6 +66,7 @@ public class QLinksFragment extends BaseFragment {
CAMP
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://camp.iitb.ac.in/"
);
}
});
MSStore
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://msstore.iitb.ac.in/"
);
}
});
BigHome
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://home.iitb.ac.in/"
);
}
});
// FTP.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { goToUrl("ftp://ftp.iitb.ac.in/"); } });
Intercom
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://portal.iitb.ac.in/TelephoneDirectory/"
);
}
});
Hospital
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/hospital/"
);
}
});
VPN
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://www.cc.iitb.ac.in/engservices/engaccessingiitffromoutside/19-vpn"
);
}
});
...
...
app/src/main/java/app/insti/fragment/SettingsFragment.java
View file @
36176be4
...
...
@@ -7,6 +7,7 @@ import android.os.Bundle;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -47,6 +48,9 @@ public class SettingsFragment extends Fragment {
@Override
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Settings"
);
Bundle
bundle
=
getArguments
();
String
userID
=
bundle
.
getString
(
Constants
.
USER_ID
);
...
...
app/src/main/java/app/insti/fragment/TrainingBlogFragment.java
View file @
36176be4
...
...
@@ -10,6 +10,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -56,6 +57,9 @@ public class TrainingBlogFragment extends BaseFragment {
public
void
onStart
()
{
super
.
onStart
();
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Training Blog"
);
appDatabase
=
AppDatabase
.
getAppDatabase
(
getContext
());
new
TrainingBlogFragment
.
showTrainingBlogFromDB
().
execute
();
...
...
app/src/main/res/layout/fragment_about.xml
View file @
36176be4
...
...
@@ -531,7 +531,7 @@
<TextView
android:id=
"@+id/wncc"
android:layout_width=
"wrap_content"
android:layout_height=
"
15dp
"
android:layout_height=
"
wrap_content
"
android:layout_gravity=
"center"
android:layout_marginTop=
"10dp"
android:textStyle=
"bold"
...
...
app/src/main/res/layout/fragment_calendar.xml
View file @
36176be4
...
...
@@ -72,7 +72,7 @@
android:layout_margin=
"16dp"
android:src=
"@android:drawable/ic_input_add"
android:tint=
"@android:color/black"
android:visibility=
"
invisibl
e"
/>
android:visibility=
"
gon
e"
/>
<RelativeLayout
android:id=
"@+id/loadingPanel"
...
...
app/src/main/res/layout/fragment_feed.xml
View file @
36176be4
...
...
@@ -26,7 +26,7 @@
android:layout_margin=
"16dp"
android:src=
"@android:drawable/ic_input_add"
android:tint=
"@android:color/black"
android:visibility=
"
invisibl
e"
/>
android:visibility=
"
gon
e"
/>
<RelativeLayout
android:id=
"@+id/loadingPanel"
...
...
app/src/main/res/layout/fragment_my_events.xml
View file @
36176be4
...
...
@@ -27,7 +27,7 @@
android:layout_margin=
"16dp"
android:src=
"@android:drawable/ic_input_add"
android:tint=
"@android:color/black"
android:visibility=
"
invisibl
e"
/>
android:visibility=
"
gon
e"
/>
<RelativeLayout
android:id=
"@+id/loadingPanel"
...
...
app/src/main/res/values/dimens.xml
View file @
36176be4
...
...
@@ -5,5 +5,6 @@
<dimen
name=
"nav_header_vertical_spacing"
>
8dp
</dimen>
<dimen
name=
"nav_header_height"
>
176dp
</dimen>
<dimen
name=
"fab_margin"
>
16dp
</dimen>
<dimen
name=
"quick_links_size"
>
18dp
</dimen>
<dimen
name=
"quick_links_size"
>
18sp
</dimen>
<dimen
name=
"links_margin_start"
>
8dp
</dimen>
</resources>
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