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
2f655a18
Commit
2f655a18
authored
Jul 06, 2018
by
Sajal Narang
Committed by
GitHub
Jul 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into master
parents
b1a5cc1f
fd00ef69
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
90 additions
and
57 deletions
+90
-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
+52
-39
app/src/main/java/app/insti/fragment/CalendarFragment.java
app/src/main/java/app/insti/fragment/CalendarFragment.java
+2
-1
app/src/main/java/app/insti/fragment/FeedFragment.java
app/src/main/java/app/insti/fragment/FeedFragment.java
+2
-1
app/src/main/java/app/insti/fragment/MyEventsFragment.java
app/src/main/java/app/insti/fragment/MyEventsFragment.java
+2
-1
app/src/main/java/app/insti/fragment/QLinksFragment.java
app/src/main/java/app/insti/fragment/QLinksFragment.java
+2
-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 @
2f655a18
No preview for this file type
app/src/main/java/app/insti/Constants.java
View file @
2f655a18
...
...
@@ -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 @
2f655a18
...
...
@@ -208,20 +208,33 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
updateFragment
(
feedFragment
);
break
;
case
R
.
id
.
nav_my_events
:
MyEventsFragment
myeventsFragment
=
new
MyEventsFragment
();
updateFragment
(
myeventsFragment
);
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
:
PlacementBlogFragment
placementBlogFragment
=
new
PlacementBlogFragment
();
updateFragment
(
placementBlogFragment
);
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
:
TrainingBlogFragment
trainingBlogFragment
=
new
TrainingBlogFragment
();
updateFragment
(
trainingBlogFragment
);
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 @
2f655a18
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
;
...
...
@@ -8,9 +10,13 @@ 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
;
...
...
@@ -40,44 +46,51 @@ public class AboutFragment extends BaseFragment {
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"About"
);
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
);
/* 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/CalendarFragment.java
View file @
2f655a18
...
...
@@ -93,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/FeedFragment.java
View file @
2f655a18
...
...
@@ -91,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/MyEventsFragment.java
View file @
2f655a18
...
...
@@ -73,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/QLinksFragment.java
View file @
2f655a18
...
...
@@ -43,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
);
...
...
@@ -65,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/res/layout/fragment_about.xml
View file @
2f655a18
...
...
@@ -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 @
2f655a18
...
...
@@ -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 @
2f655a18
...
...
@@ -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 @
2f655a18
...
...
@@ -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 @
2f655a18
...
...
@@ -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>
</resources>
\ No newline at end of file
<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