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
3124030c
Commit
3124030c
authored
Feb 02, 2019
by
Varun Patil
Committed by
GitHub
Feb 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #268 from wncc/lottie
Lots of stuff
parents
b78325e3
7f640c0c
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
608 additions
and
258 deletions
+608
-258
app/build.gradle
app/build.gradle
+8
-2
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+6
-0
app/src/main/java/app/insti/Constants.java
app/src/main/java/app/insti/Constants.java
+3
-0
app/src/main/java/app/insti/InstiAppFirebaseMessagingService.java
...main/java/app/insti/InstiAppFirebaseMessagingService.java
+22
-1
app/src/main/java/app/insti/NotificationBroadcastReceiver.java
...rc/main/java/app/insti/NotificationBroadcastReceiver.java
+37
-0
app/src/main/java/app/insti/Utils.java
app/src/main/java/app/insti/Utils.java
+8
-0
app/src/main/java/app/insti/activity/LoginActivity.java
app/src/main/java/app/insti/activity/LoginActivity.java
+3
-2
app/src/main/java/app/insti/activity/MainActivity.java
app/src/main/java/app/insti/activity/MainActivity.java
+5
-0
app/src/main/java/app/insti/adapter/NotificationsAdapter.java
...src/main/java/app/insti/adapter/NotificationsAdapter.java
+3
-0
app/src/main/java/app/insti/api/RetrofitInterface.java
app/src/main/java/app/insti/api/RetrofitInterface.java
+3
-0
app/src/main/java/app/insti/fragment/AddEventFragment.java
app/src/main/java/app/insti/fragment/AddEventFragment.java
+9
-0
app/src/main/java/app/insti/fragment/CalendarFragment.java
app/src/main/java/app/insti/fragment/CalendarFragment.java
+222
-32
app/src/main/java/app/insti/fragment/EventFragment.java
app/src/main/java/app/insti/fragment/EventFragment.java
+50
-11
app/src/main/java/app/insti/fragment/ExploreFragment.java
app/src/main/java/app/insti/fragment/ExploreFragment.java
+0
-3
app/src/main/java/app/insti/fragment/MapFragment.java
app/src/main/java/app/insti/fragment/MapFragment.java
+35
-1
app/src/main/java/app/insti/fragment/NotificationsFragment.java
...c/main/java/app/insti/fragment/NotificationsFragment.java
+41
-0
app/src/main/java/app/insti/fragment/SettingsFragment.java
app/src/main/java/app/insti/fragment/SettingsFragment.java
+1
-0
app/src/main/java/app/insti/notifications/NotificationId.java
...src/main/java/app/insti/notifications/NotificationId.java
+17
-0
app/src/main/java/com/mrane/zoomview/CampusMapView.java
app/src/main/java/com/mrane/zoomview/CampusMapView.java
+34
-5
app/src/main/res/color/mcv_text_date_light.xml
app/src/main/res/color/mcv_text_date_light.xml
+16
-0
app/src/main/res/drawable/ic_keyboard_arrow_left_white_24dp.xml
...c/main/res/drawable/ic_keyboard_arrow_left_white_24dp.xml
+5
-0
app/src/main/res/drawable/ic_keyboard_arrow_right_white_24dp.xml
.../main/res/drawable/ic_keyboard_arrow_right_white_24dp.xml
+5
-0
app/src/main/res/layout/fragment_body.xml
app/src/main/res/layout/fragment_body.xml
+1
-12
app/src/main/res/layout/fragment_calendar.xml
app/src/main/res/layout/fragment_calendar.xml
+16
-20
app/src/main/res/layout/fragment_complaint.xml
app/src/main/res/layout/fragment_complaint.xml
+1
-13
app/src/main/res/layout/fragment_event.xml
app/src/main/res/layout/fragment_event.xml
+1
-32
app/src/main/res/layout/fragment_explore.xml
app/src/main/res/layout/fragment_explore.xml
+1
-12
app/src/main/res/layout/fragment_feed.xml
app/src/main/res/layout/fragment_feed.xml
+2
-12
app/src/main/res/layout/fragment_map.xml
app/src/main/res/layout/fragment_map.xml
+3
-20
app/src/main/res/layout/fragment_mess_menu.xml
app/src/main/res/layout/fragment_mess_menu.xml
+1
-11
app/src/main/res/layout/fragment_news.xml
app/src/main/res/layout/fragment_news.xml
+1
-11
app/src/main/res/layout/fragment_notifications.xml
app/src/main/res/layout/fragment_notifications.xml
+1
-12
app/src/main/res/layout/fragment_placement_blog.xml
app/src/main/res/layout/fragment_placement_blog.xml
+1
-11
app/src/main/res/layout/fragment_quick_links.xml
app/src/main/res/layout/fragment_quick_links.xml
+3
-1
app/src/main/res/layout/fragment_training_blog.xml
app/src/main/res/layout/fragment_training_blog.xml
+1
-11
app/src/main/res/layout/fragment_user.xml
app/src/main/res/layout/fragment_user.xml
+12
-23
app/src/main/res/layout/loading_panel.xml
app/src/main/res/layout/loading_panel.xml
+17
-0
app/src/main/res/raw/logoanim.json
app/src/main/res/raw/logoanim.json
+1
-0
app/src/main/res/values/styles.xml
app/src/main/res/values/styles.xml
+12
-0
No files found.
app/build.gradle
View file @
3124030c
...
@@ -8,8 +8,8 @@ android {
...
@@ -8,8 +8,8 @@ android {
manifestPlaceholders
'appAuthRedirectScheme'
:
'https'
manifestPlaceholders
'appAuthRedirectScheme'
:
'https'
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
28
targetSdkVersion
28
versionCode
2
2
versionCode
2
5
versionName
"1.
2
"
versionName
"1.
3
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
}
}
...
@@ -34,6 +34,9 @@ ext {
...
@@ -34,6 +34,9 @@ ext {
firebaseVersion
=
'17.3.4'
firebaseVersion
=
'17.3.4'
flexboxVersion
=
'1.0.0'
flexboxVersion
=
'1.0.0'
sectionedRecyclerViewVersion
=
'1.2.0'
sectionedRecyclerViewVersion
=
'1.2.0'
lottieVersion
=
'2.7.0'
shortcutBadgerVersion
=
'1.1.22@aar'
materialCalendarViewVersion
=
'2.0.1'
}
}
dependencies
{
dependencies
{
...
@@ -57,5 +60,8 @@ dependencies {
...
@@ -57,5 +60,8 @@ dependencies {
implementation
"me.relex:circleindicator:${circleIndicatorVersion}"
implementation
"me.relex:circleindicator:${circleIndicatorVersion}"
implementation
"com.google.android:flexbox:${flexboxVersion}"
implementation
"com.google.android:flexbox:${flexboxVersion}"
implementation
"io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:${sectionedRecyclerViewVersion}"
implementation
"io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:${sectionedRecyclerViewVersion}"
implementation
"com.airbnb.android:lottie:$lottieVersion"
implementation
"me.leolin:ShortcutBadger:$shortcutBadgerVersion"
implementation
"com.github.prolificinteractive:material-calendarview:${materialCalendarViewVersion}"
}
}
apply
plugin:
'com.google.gms.google-services'
apply
plugin:
'com.google.gms.google-services'
app/src/main/AndroidManifest.xml
View file @
3124030c
...
@@ -99,6 +99,12 @@
...
@@ -99,6 +99,12 @@
</intent-filter>
</intent-filter>
</service>
</service>
<receiver
android:name=
".NotificationBroadcastReceiver"
>
<intent-filter>
<action
android:name=
"notification_cancelled"
/>
</intent-filter>
</receiver>
<meta-data
<meta-data
android:name=
"com.google.firebase.messaging.default_notification_channel_id"
android:name=
"com.google.firebase.messaging.default_notification_channel_id"
android:value=
"@string/default_notification_channel_id"
/>
android:value=
"@string/default_notification_channel_id"
/>
...
...
app/src/main/java/app/insti/Constants.java
View file @
3124030c
...
@@ -45,6 +45,8 @@ public class Constants {
...
@@ -45,6 +45,8 @@ public class Constants {
public
static
final
String
FCM_BUNDLE_IMAGE
=
"image_url"
;
public
static
final
String
FCM_BUNDLE_IMAGE
=
"image_url"
;
public
static
final
String
FCM_BUNDLE_LARGE_ICON
=
"large_icon"
;
public
static
final
String
FCM_BUNDLE_LARGE_ICON
=
"large_icon"
;
public
static
final
String
FCM_BUNDLE_LARGE_CONTENT
=
"large_content"
;
public
static
final
String
FCM_BUNDLE_LARGE_CONTENT
=
"large_content"
;
public
static
final
String
FCM_BUNDLE_TOTAL_COUNT
=
"total_count"
;
public
static
final
String
NOTIF_CANCELLED
=
"notif_cancelled"
;
public
static
final
String
FCM_BUNDLE_ACTION_STARTING
=
"starting"
;
public
static
final
String
FCM_BUNDLE_ACTION_STARTING
=
"starting"
;
...
@@ -61,4 +63,5 @@ public class Constants {
...
@@ -61,4 +63,5 @@ public class Constants {
public
static
final
double
MAP_Xn
=
19.134417
,
MAP_Yn
=
72.901229
,
MAP_Zn
=
1757
,
MAP_Zyn
=
501
;
public
static
final
double
MAP_Xn
=
19.134417
,
MAP_Yn
=
72.901229
,
MAP_Zn
=
1757
,
MAP_Zyn
=
501
;
public
static
final
double
[]
MAP_WEIGHTS_X
=
{-
11.392001766454612
,
-
36.31634553309953
,
73.91269388324432
,
-
24.14021153064087
,
3.4508817531539115
,
-
0.1462262375477863
,
5.532505074667804
,
-
1.542391995870977
,
36.14211738142935
};
public
static
final
double
[]
MAP_WEIGHTS_X
=
{-
11.392001766454612
,
-
36.31634553309953
,
73.91269388324432
,
-
24.14021153064087
,
3.4508817531539115
,
-
0.1462262375477863
,
5.532505074667804
,
-
1.542391995870977
,
36.14211738142935
};
public
static
final
double
[]
MAP_WEIGHTS_Y
=
{
0.09738953520399705
,
-
4.519868444089616
,
62.38493718381985
,
16.664561869057696
,
-
2.168377988768651
,
0.0919143297622087
,
0.32304266159540823
,
0.21688067854428716
,
-
12.81393255320748
};
public
static
final
double
[]
MAP_WEIGHTS_Y
=
{
0.09738953520399705
,
-
4.519868444089616
,
62.38493718381985
,
16.664561869057696
,
-
2.168377988768651
,
0.0919143297622087
,
0.32304266159540823
,
0.21688067854428716
,
-
12.81393255320748
};
public
static
final
String
MAP_INITIAL_MARKER
=
"initial_marker"
;
}
}
app/src/main/java/app/insti/InstiAppFirebaseMessagingService.java
View file @
3124030c
...
@@ -26,6 +26,7 @@ import java.util.Map;
...
@@ -26,6 +26,7 @@ import java.util.Map;
import
app.insti.activity.MainActivity
;
import
app.insti.activity.MainActivity
;
import
app.insti.notifications.NotificationId
;
import
app.insti.notifications.NotificationId
;
import
me.leolin.shortcutbadger.ShortcutBadger
;
public
class
InstiAppFirebaseMessagingService
extends
FirebaseMessagingService
{
public
class
InstiAppFirebaseMessagingService
extends
FirebaseMessagingService
{
String
channel
;
String
channel
;
...
@@ -53,6 +54,14 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
...
@@ -53,6 +54,14 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
return
PendingIntent
.
getActivity
(
this
,
notificationId
,
intent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
return
PendingIntent
.
getActivity
(
this
,
notificationId
,
intent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
}
}
/** In case the notification is dismissed */
protected
PendingIntent
getDeleteIntent
(
RemoteMessage
remoteMessage
,
Integer
notificationId
)
{
Intent
intent
=
new
Intent
(
getApplicationContext
(),
NotificationBroadcastReceiver
.
class
);
intent
.
setAction
(
Constants
.
NOTIF_CANCELLED
);
intent
.
putExtra
(
Constants
.
FCM_BUNDLE_NOTIFICATION_ID
,
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_NOTIFICATION_ID
));
return
PendingIntent
.
getBroadcast
(
getApplicationContext
(),
notificationId
,
intent
,
PendingIntent
.
FLAG_CANCEL_CURRENT
);
}
@Override
@Override
public
void
onMessageReceived
(
RemoteMessage
remoteMessage
)
{
public
void
onMessageReceived
(
RemoteMessage
remoteMessage
)
{
channel
=
getResources
().
getString
(
R
.
string
.
default_notification_channel_id
);
channel
=
getResources
().
getString
(
R
.
string
.
default_notification_channel_id
);
...
@@ -84,7 +93,19 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
...
@@ -84,7 +93,19 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
NotificationCompat
.
Builder
builder
=
standardNotificationBuilder
()
NotificationCompat
.
Builder
builder
=
standardNotificationBuilder
()
.
setContentTitle
(
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_TITLE
))
.
setContentTitle
(
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_TITLE
))
.
setContentText
(
message
)
.
setContentText
(
message
)
.
setContentIntent
(
getNotificationIntent
(
remoteMessage
,
notification_id
));
.
setContentIntent
(
getNotificationIntent
(
remoteMessage
,
notification_id
))
.
setDeleteIntent
(
getDeleteIntent
(
remoteMessage
,
notification_id
));
/* Update the badge */
final
String
count
=
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_TOTAL_COUNT
);
if
(
count
!=
null
)
{
try
{
int
total_count
=
Integer
.
parseInt
(
count
);
NotificationId
.
setCurrentCount
(
total_count
);
ShortcutBadger
.
applyCount
(
getApplicationContext
(),
total_count
);
}
catch
(
NumberFormatException
ignored
)
{}
}
/* Check for article */
/* Check for article */
String
largeContent
=
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_LARGE_CONTENT
);
String
largeContent
=
remoteMessage
.
getData
().
get
(
Constants
.
FCM_BUNDLE_LARGE_CONTENT
);
...
...
app/src/main/java/app/insti/NotificationBroadcastReceiver.java
0 → 100644
View file @
3124030c
package
app.insti
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.ServiceGenerator
;
import
app.insti.notifications.NotificationId
;
import
me.leolin.shortcutbadger.ShortcutBadger
;
public
class
NotificationBroadcastReceiver
extends
BroadcastReceiver
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
.
getAction
().
equals
(
Constants
.
NOTIF_CANCELLED
))
{
// Get the notification id
String
id
=
intent
.
getExtras
().
getString
(
Constants
.
FCM_BUNDLE_NOTIFICATION_ID
);
if
(
id
==
null
||
id
.
equals
(
""
))
return
;
// Get retrofit and session id
ServiceGenerator
serviceGenerator
=
new
ServiceGenerator
(
context
);
RetrofitInterface
retrofitInterface
=
serviceGenerator
.
getRetrofitInterface
();
SessionManager
session
=
new
SessionManager
(
context
);
if
(
session
.
isLoggedIn
())
{
Utils
.
setSessionId
(
session
.
getSessionID
());
}
// Mark as read
retrofitInterface
.
markNotificationDeleted
(
Utils
.
getSessionIDHeader
(),
id
).
enqueue
(
new
EmptyCallback
<
Void
>());
// Reduce current count
ShortcutBadger
.
applyCount
(
context
.
getApplicationContext
(),
NotificationId
.
decrementAndGetCurrentCount
());
}
}
}
app/src/main/java/app/insti/Utils.java
View file @
3124030c
...
@@ -5,6 +5,7 @@ import android.content.Context;
...
@@ -5,6 +5,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.RequiresApi
;
import
android.support.design.widget.NavigationView
;
import
android.support.design.widget.NavigationView
;
import
android.support.transition.Fade
;
import
android.support.transition.Fade
;
import
android.support.transition.Slide
;
import
android.support.transition.Slide
;
...
@@ -13,6 +14,7 @@ import android.support.v4.app.Fragment;
...
@@ -13,6 +14,7 @@ import android.support.v4.app.Fragment;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v4.app.FragmentTransaction
;
import
android.view.View
;
import
android.view.View
;
import
android.webkit.CookieManager
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -247,4 +249,10 @@ public final class Utils {
...
@@ -247,4 +249,10 @@ public final class Utils {
}
}
}
}
}
}
@RequiresApi
(
21
)
public
static
void
clearCookies
(
Context
context
)
{
CookieManager
.
getInstance
().
removeAllCookies
(
null
);
CookieManager
.
getInstance
().
flush
();
}
}
}
app/src/main/java/app/insti/activity/LoginActivity.java
View file @
3124030c
...
@@ -52,9 +52,10 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -52,9 +52,10 @@ public class LoginActivity extends AppCompatActivity {
session
=
new
SessionManager
(
mContext
);
session
=
new
SessionManager
(
mContext
);
if
(
session
.
isLoggedIn
())
{
if
(
session
.
isLoggedIn
())
{
openMainActivity
();
openMainActivity
();
}
else
{
setContentView
(
R
.
layout
.
activity_login
);
progressDialog
=
new
ProgressDialog
(
LoginActivity
.
this
);
}
}
setContentView
(
R
.
layout
.
activity_login
);
progressDialog
=
new
ProgressDialog
(
LoginActivity
.
this
);
}
}
private
void
openMainActivity
()
{
private
void
openMainActivity
()
{
...
...
app/src/main/java/app/insti/activity/MainActivity.java
View file @
3124030c
...
@@ -75,6 +75,8 @@ import app.insti.fragment.QuickLinksFragment;
...
@@ -75,6 +75,8 @@ import app.insti.fragment.QuickLinksFragment;
import
app.insti.fragment.SettingsFragment
;
import
app.insti.fragment.SettingsFragment
;
import
app.insti.fragment.TrainingBlogFragment
;
import
app.insti.fragment.TrainingBlogFragment
;
import
app.insti.fragment.UserFragment
;
import
app.insti.fragment.UserFragment
;
import
app.insti.notifications.NotificationId
;
import
me.leolin.shortcutbadger.ShortcutBadger
;
import
retrofit2.Call
;
import
retrofit2.Call
;
import
retrofit2.Response
;
import
retrofit2.Response
;
...
@@ -195,6 +197,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -195,6 +197,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
Utils
.
notificationCache
=
new
UpdatableList
<>();
Utils
.
notificationCache
=
new
UpdatableList
<>();
Utils
.
notificationCache
.
setList
(
response
.
body
());
Utils
.
notificationCache
.
setList
(
response
.
body
());
showNotifications
();
showNotifications
();
NotificationId
.
setCurrentCount
(
Utils
.
notificationCache
.
size
());
ShortcutBadger
.
applyCount
(
getApplicationContext
(),
NotificationId
.
getCurrentCount
());
}
}
}
}
});
});
...
...
app/src/main/java/app/insti/adapter/NotificationsAdapter.java
View file @
3124030c
...
@@ -19,6 +19,8 @@ import app.insti.fragment.NewsFragment;
...
@@ -19,6 +19,8 @@ import app.insti.fragment.NewsFragment;
import
app.insti.fragment.NotificationsFragment
;
import
app.insti.fragment.NotificationsFragment
;
import
app.insti.fragment.PlacementBlogFragment
;
import
app.insti.fragment.PlacementBlogFragment
;
import
app.insti.fragment.TrainingBlogFragment
;
import
app.insti.fragment.TrainingBlogFragment
;
import
app.insti.notifications.NotificationId
;
import
me.leolin.shortcutbadger.ShortcutBadger
;
public
class
NotificationsAdapter
extends
CardAdapter
<
Notification
>
{
public
class
NotificationsAdapter
extends
CardAdapter
<
Notification
>
{
private
NotificationsFragment
notificationsFragment
;
private
NotificationsFragment
notificationsFragment
;
...
@@ -34,6 +36,7 @@ public class NotificationsAdapter extends CardAdapter<Notification> {
...
@@ -34,6 +36,7 @@ public class NotificationsAdapter extends CardAdapter<Notification> {
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
String
sessId
=
Utils
.
getSessionIDHeader
();
String
sessId
=
Utils
.
getSessionIDHeader
();
retrofitInterface
.
markNotificationRead
(
sessId
,
notification
.
getNotificationId
().
toString
()).
enqueue
(
new
EmptyCallback
<
Void
>());
retrofitInterface
.
markNotificationRead
(
sessId
,
notification
.
getNotificationId
().
toString
()).
enqueue
(
new
EmptyCallback
<
Void
>());
ShortcutBadger
.
applyCount
(
fragmentActivity
.
getApplicationContext
(),
NotificationId
.
decrementAndGetCurrentCount
());
/* Close the bottom sheet */
/* Close the bottom sheet */
notificationsFragment
.
dismiss
();
notificationsFragment
.
dismiss
();
...
...
app/src/main/java/app/insti/api/RetrofitInterface.java
View file @
3124030c
...
@@ -112,6 +112,9 @@ public interface RetrofitInterface {
...
@@ -112,6 +112,9 @@ public interface RetrofitInterface {
@GET
(
"notifications/read/{notificationID}"
)
@GET
(
"notifications/read/{notificationID}"
)
Call
<
Void
>
markNotificationRead
(
@Header
(
"Cookie"
)
String
sessionID
,
@Path
(
"notificationID"
)
String
notificationID
);
Call
<
Void
>
markNotificationRead
(
@Header
(
"Cookie"
)
String
sessionID
,
@Path
(
"notificationID"
)
String
notificationID
);
@GET
(
"notifications/read/{notificationID}?delete=1"
)
Call
<
Void
>
markNotificationDeleted
(
@Header
(
"Cookie"
)
String
sessionID
,
@Path
(
"notificationID"
)
String
notificationID
);
@GET
(
"logout"
)
@GET
(
"logout"
)
Call
<
Void
>
logout
(
@Header
(
"Cookie"
)
String
sessionID
);
Call
<
Void
>
logout
(
@Header
(
"Cookie"
)
String
sessionID
);
...
...
app/src/main/java/app/insti/fragment/AddEventFragment.java
View file @
3124030c
...
@@ -38,11 +38,17 @@ import retrofit2.Response;
...
@@ -38,11 +38,17 @@ import retrofit2.Response;
public
class
AddEventFragment
extends
BaseFragment
{
public
class
AddEventFragment
extends
BaseFragment
{
public
ValueCallback
<
Uri
[]>
uploadMessage
;
public
ValueCallback
<
Uri
[]>
uploadMessage
;
private
ProgressDialog
progressDialog
;
private
ProgressDialog
progressDialog
;
private
String
query
=
""
;
public
AddEventFragment
()
{
public
AddEventFragment
()
{
// Required empty public constructor
// Required empty public constructor
}
}
public
AddEventFragment
withDate
(
String
date
)
{
query
+=
"&date="
+
date
;
return
this
;
}
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
super
.
onStart
();
super
.
onStart
();
...
@@ -92,6 +98,9 @@ public class AddEventFragment extends BaseFragment {
...
@@ -92,6 +98,9 @@ public class AddEventFragment extends BaseFragment {
url
=
"https://"
+
host
+
"/edit-body/"
+
getArguments
().
getString
(
"bodyId"
)
+
"?sandbox=true"
;
url
=
"https://"
+
host
+
"/edit-body/"
+
getArguments
().
getString
(
"bodyId"
)
+
"?sandbox=true"
;
toolbar
.
setTitle
(
"Update Organization"
);
toolbar
.
setTitle
(
"Update Organization"
);
}
}
url
+=
query
;
webView
.
loadUrl
(
url
);
webView
.
loadUrl
(
url
);
webView
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
webView
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
...
...
app/src/main/java/app/insti/fragment/CalendarFragment.java
View file @
3124030c
package
app.insti.fragment
;
package
app.insti.fragment
;
import
android.animation.ArgbEvaluator
;
import
android.graphics.drawable.GradientDrawable
;
import
android.graphics.drawable.InsetDrawable
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.widget.NestedScrollView
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.Toolbar
;
import
android.support.v7.widget.Toolbar
;
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.view.animation.AlphaAnimation
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.prolificinteractive.materialcalendarview.CalendarDay
;
import
com.prolificinteractive.materialcalendarview.DayViewDecorator
;
import
com.prolificinteractive.materialcalendarview.DayViewFacade
;
import
com.prolificinteractive.materialcalendarview.MaterialCalendarView
;
import
com.prolificinteractive.materialcalendarview.OnDateSelectedListener
;
import
com.prolificinteractive.materialcalendarview.OnMonthChangedListener
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
...
@@ -21,7 +34,11 @@ import java.text.SimpleDateFormat;
...
@@ -21,7 +34,11 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.TimeZone
;
import
java.util.TimeZone
;
import
app.insti.R
;
import
app.insti.R
;
...
@@ -35,6 +52,8 @@ import retrofit2.Call;
...
@@ -35,6 +52,8 @@ import retrofit2.Call;
import
retrofit2.Callback
;
import
retrofit2.Callback
;
import
retrofit2.Response
;
import
retrofit2.Response
;
import
static
android
.
view
.
View
.
VISIBLE
;
/**
/**
* A simple {@link Fragment} subclass.
* A simple {@link Fragment} subclass.
*/
*/
...
@@ -43,7 +62,9 @@ public class CalendarFragment extends BaseFragment {
...
@@ -43,7 +62,9 @@ public class CalendarFragment extends BaseFragment {
FloatingActionButton
fab
;
FloatingActionButton
fab
;
private
View
view
;
private
View
view
;
private
FeedAdapter
feedAdapter
=
null
;
private
FeedAdapter
feedAdapter
=
null
;
private
List
<
Event
>
events
;
private
List
<
Event
>
events
=
new
ArrayList
<>();
private
HashSet
<
CalendarDay
>
haveMonths
=
new
HashSet
<>();
private
boolean
initialized
=
false
;
public
CalendarFragment
()
{
public
CalendarFragment
()
{
...
@@ -54,58 +75,136 @@ public class CalendarFragment extends BaseFragment {
...
@@ -54,58 +75,136 @@ public class CalendarFragment extends BaseFragment {
@Override
@Override
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
);
fab
=
(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
fab
=
(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
// Setup toolbar
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
Toolbar
toolbar
=
getActivity
().
findViewById
(
R
.
id
.
toolbar
);
toolbar
.
setTitle
(
"Calendar"
);
toolbar
.
setTitle
(
"Calendar"
);
Utils
.
setSelectedMenuItem
(
getActivity
(),
R
.
id
.
nav_calendar
);
Utils
.
setSelectedMenuItem
(
getActivity
(),
R
.
id
.
nav_calendar
);
final
CalendarView
simpleCalendarView
=
(
CalendarView
)
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
// get the reference of CalendarView
// Handle selecting date
simpleCalendarView
.
setFirstDayOfWeek
(
1
);
// set Sunday as the first day of the week
final
MaterialCalendarView
matCalendarView
=
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
matCalendarView
.
setOnDateChangedListener
(
new
OnDateSelectedListener
()
{
simpleCalendarView
.
setWeekNumberColor
(
getResources
().
getColor
(
R
.
color
.
colorCalendarWeek
));
//setWeekNumberColor
simpleCalendarView
.
setOnDateChangeListener
(
new
CalendarView
.
OnDateChangeListener
()
{
@Override
@Override
public
void
on
SelectedDayChange
(
CalendarView
view
,
int
year
,
int
month
,
int
dayOfMonth
)
{
public
void
on
DateSelected
(
@NonNull
MaterialCalendarView
widget
,
@NonNull
CalendarDay
date
,
boolean
selected
)
{
String
sdate
=
dayOfMonth
+
"/"
+
(
month
+
1
)
+
"/"
+
year
;
if
(
selected
)
{
try
{
try
{
Date
showDate
=
new
SimpleDateFormat
(
"dd/M/yyyy"
).
parse
(
sdate
);
showEventsForDate
(
toDate
(
date
)
);
showEventsForDate
(
showDate
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
});
});
fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
// Update events on month change
matCalendarView
.
setOnMonthChangedListener
(
new
OnMonthChangedListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onMonthChanged
(
MaterialCalendarView
widget
,
CalendarDay
date
)
{
AddEventFragment
addEventFragment
=
new
AddEventFragment
();
updateEvents
(
date
,
false
);
((
MainActivity
)
getActivity
()).
updateFragment
(
addEventFragment
);
}
}
});
});
return
view
;
}
@Override
public
void
onStart
()
{
super
.
onStart
();
updateEvents
(
CalendarDay
.
today
(),
true
);
}
/** Show the fab if we can make events */
private
void
showFab
()
{
if
(((
MainActivity
)
getActivity
()).
createEventAccess
())
{
if
(((
MainActivity
)
getActivity
()).
createEventAccess
())
{
fab
.
show
();
fab
.
show
();
NestedScrollView
nsv
=
view
.
findViewById
(
R
.
id
.
calendar_nsv
);
nsv
.
setOnScrollChangeListener
(
new
NestedScrollView
.
OnScrollChangeListener
()
{
@Override
public
void
onScrollChange
(
NestedScrollView
v
,
int
scrollX
,
int
scrollY
,
int
oldScrollX
,
int
oldScrollY
)
{
if
(
scrollY
>
oldScrollY
)
fab
.
hide
();
else
fab
.
show
();
}
});
// Handle fab click
fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
CalendarDay
day
=
((
MaterialCalendarView
)
view
.
findViewById
(
R
.
id
.
simpleCalendarView
)).
getSelectedDate
();
String
date
=
day
.
getYear
()
+
"-"
+
day
.
getMonth
()
+
"-"
+
day
.
getDay
();
AddEventFragment
addEventFragment
=
(
new
AddEventFragment
()).
withDate
(
date
);
((
MainActivity
)
getActivity
()).
updateFragment
(
addEventFragment
);
}
});
}
}
/** Convert CalendarDay to Date */
private
Date
toDate
(
CalendarDay
date
)
throws
ParseException
{
String
sdate
=
date
.
getDay
()
+
"/"
+
date
.
getMonth
()
+
"/"
+
date
.
getYear
();
Date
showDate
=
new
SimpleDateFormat
(
"dd/M/yyyy"
).
parse
(
sdate
);
return
showDate
;
}
/** Decorator for Calendar */
private
class
EventDecorator
implements
DayViewDecorator
{
private
final
int
color
=
getResources
().
getColor
(
R
.
color
.
colorAccent
);
private
final
int
white
=
getResources
().
getColor
(
R
.
color
.
primaryTextColor
);
private
final
HashSet
<
CalendarDay
>
dates
;
private
final
int
alpha
;
public
EventDecorator
(
int
alpha
,
HashSet
<
CalendarDay
>
dates
)
{
this
.
dates
=
dates
;
this
.
alpha
=
alpha
;
}
}
updateEvents
();
@Override
return
view
;
public
boolean
shouldDecorate
(
CalendarDay
day
)
{
return
dates
.
contains
(
day
);
}
@Override
public
void
decorate
(
DayViewFacade
view
)
{
GradientDrawable
gD
=
new
GradientDrawable
();
gD
.
setColor
((
int
)
new
ArgbEvaluator
().
evaluate
(((
float
)
alpha
/
255.0f
),
white
,
color
));
gD
.
setShape
(
GradientDrawable
.
OVAL
);
InsetDrawable
iD
=
new
InsetDrawable
(
gD
,
15
);
view
.
setBackgroundDrawable
(
iD
);
}
}
}
private
void
updateEvents
()
{
private
void
updateEvents
(
CalendarDay
calendarDay
,
final
boolean
setToday
)
{
// Do not make duplicate calls
if
(
haveMonths
.
contains
(
calendarDay
))
{
if
(!
setToday
)
{
return
;
}
else
{
setupCalendar
(
true
);
}
}
haveMonths
.
add
(
calendarDay
);
// Parsers
String
ISO_FORMAT
=
"yyyy-MM-dd HH:mm:ss"
;
String
ISO_FORMAT
=
"yyyy-MM-dd HH:mm:ss"
;
final
TimeZone
utc
=
TimeZone
.
getTimeZone
(
"UTC"
);
final
TimeZone
utc
=
TimeZone
.
getTimeZone
(
"UTC"
);
final
SimpleDateFormat
isoFormatter
=
new
SimpleDateFormat
(
ISO_FORMAT
);
final
SimpleDateFormat
isoFormatter
=
new
SimpleDateFormat
(
ISO_FORMAT
);
isoFormatter
.
setTimeZone
(
utc
);
isoFormatter
.
setTimeZone
(
utc
);
final
Date
today
=
new
Date
();
// Get the start date
final
Date
startDate
;
try
{
startDate
=
toDate
(
calendarDay
);
}
catch
(
ParseException
ignored
)
{
return
;
}
// Get start and end times
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
startDate
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
final
Date
oneMonthBackDate
=
cal
.
getTime
();
final
Date
oneMonthBackDate
=
cal
.
getTime
();
cal
.
add
(
Calendar
.
MONTH
,
2
);
cal
.
add
(
Calendar
.
MONTH
,
2
);
...
@@ -114,20 +213,23 @@ public class CalendarFragment extends BaseFragment {
...
@@ -114,20 +213,23 @@ public class CalendarFragment extends BaseFragment {
final
String
oneMonthBack
=
isoFormatter
.
format
(
oneMonthBackDate
).
toString
();
final
String
oneMonthBack
=
isoFormatter
.
format
(
oneMonthBackDate
).
toString
();
final
String
oneMonthOn
=
isoFormatter
.
format
(
oneMonthOnDate
).
toString
();
final
String
oneMonthOn
=
isoFormatter
.
format
(
oneMonthOnDate
).
toString
();
// Make the API call
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
getEventsBetweenDates
(
Utils
.
getSessionIDHeader
(),
oneMonthBack
,
oneMonthOn
).
enqueue
(
new
Callback
<
NewsFeedResponse
>()
{
retrofitInterface
.
getEventsBetweenDates
(
Utils
.
getSessionIDHeader
(),
oneMonthBack
,
oneMonthOn
).
enqueue
(
new
Callback
<
NewsFeedResponse
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
NewsFeedResponse
>
call
,
Response
<
NewsFeedResponse
>
response
)
{
public
void
onResponse
(
Call
<
NewsFeedResponse
>
call
,
Response
<
NewsFeedResponse
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
// Concatenate the response
NewsFeedResponse
newsFeedResponse
=
response
.
body
();
NewsFeedResponse
newsFeedResponse
=
response
.
body
();
events
=
newsFeedResponse
.
getEvents
();
List
<
Event
>
eventList
=
newsFeedResponse
.
getEvents
();
DateFormat
formatter
=
new
SimpleDateFormat
(
"dd/MM/yyyy"
);
if
(
eventList
==
null
)
return
;
try
{
Date
todayWithZeroTime
=
formatter
.
parse
(
formatter
.
format
(
today
));
// Concatenate
showEventsForDate
(
todayWithZeroTime
);
for
(
Event
event
:
eventList
)
{
}
catch
(
ParseException
e
)
{
if
(!
events
.
contains
(
event
))
events
.
add
(
event
);
e
.
printStackTrace
();
}
}
setupCalendar
(
setToday
);
}
}
}
}
...
@@ -139,6 +241,94 @@ public class CalendarFragment extends BaseFragment {
...
@@ -139,6 +241,94 @@ public class CalendarFragment extends BaseFragment {
});
});
}
}
/** Show the calendar */
private
void
setupCalendar
(
boolean
setToday
)
{
// Make the calendar visible if it isn't
final
LinearLayout
calendarLayout
=
getView
().
findViewById
(
R
.
id
.
calendar_layout
);
if
(
calendarLayout
.
getVisibility
()
==
View
.
GONE
)
{
calendarLayout
.
setVisibility
(
VISIBLE
);
getView
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
AlphaAnimation
anim
=
new
AlphaAnimation
(
0.0f
,
1.0f
);
anim
.
setDuration
(
250
);
calendarLayout
.
startAnimation
(
anim
);
}
// Initialize to show today's date
final
MaterialCalendarView
matCalendarView
=
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
if
(
setToday
)
{
// Select today's date
if
(!
initialized
)
{
initialized
=
true
;
matCalendarView
.
setSelectedDate
(
CalendarDay
.
today
());
}
// Show the fab
showFab
();
}
// Show today
try
{
DateFormat
formatter
=
new
SimpleDateFormat
(
"dd/MM/yyyy"
);
Date
todayWithZeroTime
=
formatter
.
parse
(
formatter
.
format
(
toDate
(
matCalendarView
.
getSelectedDate
())));
showEventsForDate
(
todayWithZeroTime
);
}
catch
(
ParseException
ignored
)
{}
// Generate the decorators
showHeatMap
(
events
);
}
/** Build and show the heat map from the list of events */
private
void
showHeatMap
(
List
<
Event
>
eventList
)
{
// Build strength map for each date
Map
<
CalendarDay
,
Integer
>
strength
=
new
HashMap
<>();
for
(
Event
event
:
eventList
)
{
// Get starting date
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
event
.
getEventStartTime
());
CalendarDay
day
=
CalendarDay
.
from
(
calendar
.
get
(
Calendar
.
YEAR
),
calendar
.
get
(
Calendar
.
MONTH
)
+
1
,
calendar
.
get
(
Calendar
.
DATE
)
);
// Update the map with strength
if
(
strength
.
containsKey
(
day
))
{
strength
.
put
(
day
,
strength
.
get
(
day
)
+
1
);
}
else
{
strength
.
put
(
day
,
1
);
}
}
// Get the calendar
final
MaterialCalendarView
matCalendarView
=
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
// Remove all decorators
matCalendarView
.
removeDecorators
();
// Create decorator for each color type
final
int
scale
=
2
;
final
int
maxMult
=
5
;
final
int
alphaStep
=
(
int
)
(
255.0f
/
(
scale
*
maxMult
));
for
(
int
i
=
1
;
i
<=
maxMult
;
i
++)
{
HashSet
<
CalendarDay
>
days
=
new
HashSet
<>();
// Iterate over the map to check remaining entries
Iterator
it
=
strength
.
entrySet
().
iterator
();
while
(
it
.
hasNext
())
{
Map
.
Entry
pair
=
(
Map
.
Entry
)
it
.
next
();
int
noEvents
=
(
Integer
)
pair
.
getValue
();
if
(
noEvents
<=
i
*
scale
||
(
i
==
maxMult
&&
noEvents
>
i
*
scale
))
{
days
.
add
((
CalendarDay
)
pair
.
getKey
());
it
.
remove
();
}
}
// Add the decorator
if
(
days
.
size
()
>
0
)
matCalendarView
.
addDecorator
(
new
EventDecorator
(
scale
*
i
*
alphaStep
,
days
));
}
}
private
void
showEventsForDate
(
Date
date
)
{
private
void
showEventsForDate
(
Date
date
)
{
/* Skip if we're already destroyed */
/* Skip if we're already destroyed */
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
...
...
app/src/main/java/app/insti/fragment/EventFragment.java
View file @
3124030c
...
@@ -11,6 +11,7 @@ import android.graphics.Point;
...
@@ -11,6 +11,7 @@ import android.graphics.Point;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.widget.NestedScrollView
;
import
android.support.v4.widget.NestedScrollView
;
...
@@ -19,6 +20,11 @@ import android.support.v7.widget.RecyclerView;
...
@@ -19,6 +20,11 @@ import android.support.v7.widget.RecyclerView;
import
android.support.v7.widget.Toolbar
;
import
android.support.v7.widget.Toolbar
;
import
android.text.Spannable
;
import
android.text.Spannable
;
import
android.text.SpannableString
;
import
android.text.SpannableString
;
import
android.text.Spanned
;
import
android.text.TextPaint
;
import
android.text.TextUtils
;
import
android.text.method.LinkMovementMethod
;
import
android.text.style.ClickableSpan
;
import
android.text.style.ForegroundColorSpan
;
import
android.text.style.ForegroundColorSpan
;
import
android.text.style.RelativeSizeSpan
;
import
android.text.style.RelativeSizeSpan
;
import
android.util.Log
;
import
android.util.Log
;
...
@@ -154,8 +160,6 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -154,8 +160,6 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
eventPicture
=
(
ImageView
)
getActivity
().
findViewById
(
R
.
id
.
event_picture_2
);
eventPicture
=
(
ImageView
)
getActivity
().
findViewById
(
R
.
id
.
event_picture_2
);
TextView
eventTitle
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_title
);
TextView
eventTitle
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_title
);
TextView
eventDate
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_date
);
TextView
eventDate
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_date
);
TextView
eventTime
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_time
);
TextView
eventVenue
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_venue
);
TextView
eventDescription
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_description
);
TextView
eventDescription
=
(
TextView
)
getActivity
().
findViewById
(
R
.
id
.
event_page_description
);
goingButton
=
getActivity
().
findViewById
(
R
.
id
.
going_button
);
goingButton
=
getActivity
().
findViewById
(
R
.
id
.
going_button
);
interestedButton
=
getActivity
().
findViewById
(
R
.
id
.
interested_button
);
interestedButton
=
getActivity
().
findViewById
(
R
.
id
.
interested_button
);
...
@@ -175,13 +179,6 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -175,13 +179,6 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
Date
Date
=
new
Date
(
timestamp
.
getTime
());
Date
Date
=
new
Date
(
timestamp
.
getTime
());
SimpleDateFormat
simpleDateFormatDate
=
new
SimpleDateFormat
(
"dd MMM"
);
SimpleDateFormat
simpleDateFormatDate
=
new
SimpleDateFormat
(
"dd MMM"
);
SimpleDateFormat
simpleDateFormatTime
=
new
SimpleDateFormat
(
"HH:mm"
);
SimpleDateFormat
simpleDateFormatTime
=
new
SimpleDateFormat
(
"HH:mm"
);
eventDate
.
setText
(
simpleDateFormatDate
.
format
(
Date
));
eventTime
.
setText
(
simpleDateFormatTime
.
format
(
Date
));
StringBuilder
eventVenueName
=
new
StringBuilder
();
for
(
Venue
venue
:
event
.
getEventVenues
())
{
eventVenueName
.
append
(
", "
).
append
(
venue
.
getVenueShortName
());
}
final
List
<
Body
>
bodyList
=
event
.
getEventBodies
();
final
List
<
Body
>
bodyList
=
event
.
getEventBodies
();
bodyRecyclerView
=
(
RecyclerView
)
getActivity
().
findViewById
(
R
.
id
.
body_card_recycler_view
);
bodyRecyclerView
=
(
RecyclerView
)
getActivity
().
findViewById
(
R
.
id
.
body_card_recycler_view
);
...
@@ -189,9 +186,51 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -189,9 +186,51 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
bodyRecyclerView
.
setAdapter
(
bodyAdapter
);
bodyRecyclerView
.
setAdapter
(
bodyAdapter
);
bodyRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
bodyRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
// Common
final
String
timing
=
simpleDateFormatDate
.
format
(
Date
)
+
" | "
+
simpleDateFormatTime
.
format
(
Date
);
StringBuilder
eventVenueName
=
new
StringBuilder
();
for
(
Venue
venue
:
event
.
getEventVenues
())
{
eventVenueName
.
append
(
", "
).
append
(
venue
.
getVenueShortName
());
}
// Make the venues clickable
if
(
eventVenueName
.
length
()
>
0
)
{
// Get the whole string
SpannableString
ss
=
new
SpannableString
(
eventVenueName
.
toString
().
substring
(
2
));
// Make each venue clickable
int
i
=
0
;
for
(
final
Venue
venue
:
event
.
getEventVenues
())
{
int
length
=
venue
.
getVenueShortName
().
length
();
ClickableSpan
cs
=
new
ClickableSpan
()
{
@Override
public
void
onClick
(
@NonNull
View
widget
)
{
MapFragment
mapFragment
=
new
MapFragment
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
MAP_INITIAL_MARKER
,
venue
.
getVenueName
());
mapFragment
.
setArguments
(
bundle
);
((
MainActivity
)
getActivity
()).
updateFragment
(
mapFragment
);
}
@Override
public
void
updateDrawState
(
TextPaint
ds
)
{
super
.
updateDrawState
(
ds
);
if
(
getActivity
()
==
null
||
!
isAdded
())
return
;
ds
.
setColor
(
getResources
().
getColor
(
R
.
color
.
primaryTextColor
));
ds
.
setUnderlineText
(
false
);
}
};
ss
.
setSpan
(
cs
,
i
,
i
+
length
,
Spanned
.
SPAN_INCLUSIVE_EXCLUSIVE
);
i
+=
length
+
2
;
}
if
(!
eventVenueName
.
toString
().
equals
(
""
))
// Setup the text view
eventVenue
.
setText
(
eventVenueName
.
toString
().
substring
(
2
));
eventDate
.
setText
(
TextUtils
.
concat
(
timing
+
" | "
,
ss
));
eventDate
.
setMovementMethod
(
LinkMovementMethod
.
getInstance
());
}
else
{
eventDate
.
setText
(
TextUtils
.
concat
(
timing
));
}
interestedButton
.
setOnClickListener
(
getUESOnClickListener
(
1
));
interestedButton
.
setOnClickListener
(
getUESOnClickListener
(
1
));
...
...
app/src/main/java/app/insti/fragment/ExploreFragment.java
View file @
3124030c
...
@@ -173,9 +173,6 @@ public class ExploreFragment extends Fragment {
...
@@ -173,9 +173,6 @@ public class ExploreFragment extends Fragment {
public
void
doSearch
(
final
String
query
)
{
public
void
doSearch
(
final
String
query
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
// Show loading spinner
getView
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
VISIBLE
);
// Set the lastest query
// Set the lastest query
currentQuery
=
query
;
currentQuery
=
query
;
...
...
app/src/main/java/app/insti/fragment/MapFragment.java
View file @
3124030c
package
app.insti.fragment
;
package
app.insti.fragment
;
import
android.Manifest
;
import
android.Manifest
;
import
android.animation.ArgbEvaluator
;
import
android.animation.ValueAnimator
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.IntentSender
;
import
android.content.IntentSender
;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageManager
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.content.res.Resources
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.graphics.PointF
;
import
android.graphics.PointF
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
...
@@ -37,6 +40,7 @@ import android.text.style.ClickableSpan;
...
@@ -37,6 +40,7 @@ import android.text.style.ClickableSpan;
import
android.text.style.StyleSpan
;
import
android.text.style.StyleSpan
;
import
android.text.util.Linkify
;
import
android.text.util.Linkify
;
import
android.util.Log
;
import
android.util.Log
;
import
android.util.TypedValue
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
...
@@ -235,6 +239,29 @@ public class MapFragment extends Fragment implements TextWatcher,
...
@@ -235,6 +239,29 @@ public class MapFragment extends Fragment implements TextWatcher,
@Override
@Override
public
void
onResponse
(
Call
<
List
<
Venue
>>
call
,
Response
<
List
<
Venue
>>
response
)
{
public
void
onResponse
(
Call
<
List
<
Venue
>>
call
,
Response
<
List
<
Venue
>>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
// Setup fade animation for background
TypedValue
typedValue
=
new
TypedValue
();
Resources
.
Theme
theme
=
getContext
().
getTheme
();
theme
.
resolveAttribute
(
R
.
attr
.
themeColor
,
typedValue
,
true
);
int
colorFrom
=
typedValue
.
data
;
int
colorTo
=
getResources
().
getColor
(
R
.
color
.
colorGray
);
ValueAnimator
colorAnimation
=
ValueAnimator
.
ofObject
(
new
ArgbEvaluator
(),
colorFrom
,
colorTo
);
colorAnimation
.
setDuration
(
250
);
// milliseconds
colorAnimation
.
addUpdateListener
(
new
ValueAnimator
.
AnimatorUpdateListener
()
{
@Override
public
void
onAnimationUpdate
(
ValueAnimator
animator
)
{
getView
().
findViewById
(
R
.
id
.
main_container
).
setBackgroundColor
(
(
int
)
animator
.
getAnimatedValue
()
);
}
});
colorAnimation
.
start
();
// Show the location fab
((
FloatingActionButton
)
getView
().
findViewById
(
R
.
id
.
locate_fab
)).
show
();
// Show the map and data
setupWithData
(
response
.
body
());
setupWithData
(
response
.
body
());
}
}
}
}
...
@@ -251,7 +278,9 @@ public class MapFragment extends Fragment implements TextWatcher,
...
@@ -251,7 +278,9 @@ public class MapFragment extends Fragment implements TextWatcher,
Locations
mLocations
=
new
Locations
(
venues
);
Locations
mLocations
=
new
Locations
(
venues
);
data
=
mLocations
.
data
;
data
=
mLocations
.
data
;
markerlist
=
new
ArrayList
<
com
.
mrane
.
data
.
Marker
>(
data
.
values
());
markerlist
=
new
ArrayList
<
com
.
mrane
.
data
.
Marker
>(
data
.
values
());
setupMap
();
if
(
getArguments
()
!=
null
)
{
setupMap
(
getArguments
().
getString
(
Constants
.
MAP_INITIAL_MARKER
));
}
// Setup locate button
// Setup locate button
FloatingActionButton
fab
=
getView
().
findViewById
(
R
.
id
.
locate_fab
);
FloatingActionButton
fab
=
getView
().
findViewById
(
R
.
id
.
locate_fab
);
...
@@ -281,6 +310,10 @@ public class MapFragment extends Fragment implements TextWatcher,
...
@@ -281,6 +310,10 @@ public class MapFragment extends Fragment implements TextWatcher,
}
}
private
void
setupMap
()
{
private
void
setupMap
()
{
setupMap
(
null
);
}
private
void
setupMap
(
String
initalMarkerName
)
{
if
(
getView
()
==
null
)
{
if
(
getView
()
==
null
)
{
return
;
return
;
}
}
...
@@ -313,6 +346,7 @@ public class MapFragment extends Fragment implements TextWatcher,
...
@@ -313,6 +346,7 @@ public class MapFragment extends Fragment implements TextWatcher,
campusMapView
.
setImageAsset
(
"map.jpg"
);
campusMapView
.
setImageAsset
(
"map.jpg"
);
campusMapView
.
setSettingsManager
(
settingsManager
);
campusMapView
.
setSettingsManager
(
settingsManager
);
campusMapView
.
setData
(
data
);
campusMapView
.
setData
(
data
);
campusMapView
.
setInitialMarkerName
(
initalMarkerName
);
addMarkerIcon
=
(
ImageButton
)
getActivity
().
findViewById
(
R
.
id
.
add_marker_icon
);
addMarkerIcon
=
(
ImageButton
)
getActivity
().
findViewById
(
R
.
id
.
add_marker_icon
);
...
...
app/src/main/java/app/insti/fragment/NotificationsFragment.java
View file @
3124030c
package
app.insti.fragment
;
package
app.insti.fragment
;
import
android.graphics.Canvas
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.design.widget.BottomSheetDialogFragment
;
import
android.support.design.widget.BottomSheetDialogFragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.helper.ItemTouchHelper
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -19,6 +21,8 @@ import app.insti.adapter.NotificationsAdapter;
...
@@ -19,6 +21,8 @@ import app.insti.adapter.NotificationsAdapter;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.model.Notification
;
import
app.insti.api.model.Notification
;
import
app.insti.notifications.NotificationId
;
import
me.leolin.shortcutbadger.ShortcutBadger
;
import
retrofit2.Call
;
import
retrofit2.Call
;
import
retrofit2.Response
;
import
retrofit2.Response
;
...
@@ -61,6 +65,9 @@ public class NotificationsFragment extends BottomSheetDialogFragment {
...
@@ -61,6 +65,9 @@ public class NotificationsFragment extends BottomSheetDialogFragment {
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
Utils
.
notificationCache
.
setList
(
response
.
body
());
Utils
.
notificationCache
.
setList
(
response
.
body
());
showNotifications
(
Utils
.
notificationCache
);
showNotifications
(
Utils
.
notificationCache
);
NotificationId
.
setCurrentCount
(
Utils
.
notificationCache
.
size
());
ShortcutBadger
.
applyCount
(
getContext
().
getApplicationContext
(),
NotificationId
.
getCurrentCount
());
}
}
}
}
});
});
...
@@ -79,6 +86,40 @@ public class NotificationsFragment extends BottomSheetDialogFragment {
...
@@ -79,6 +86,40 @@ public class NotificationsFragment extends BottomSheetDialogFragment {
notificationsRecyclerView
=
(
RecyclerView
)
getView
().
findViewById
(
R
.
id
.
notifications_recycler_view
);
notificationsRecyclerView
=
(
RecyclerView
)
getView
().
findViewById
(
R
.
id
.
notifications_recycler_view
);
notificationsRecyclerView
.
setAdapter
(
notificationsAdapter
);
notificationsRecyclerView
.
setAdapter
(
notificationsAdapter
);
notificationsRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
notificationsRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
/* Handle swiping of notifications */
ItemTouchHelper
.
SimpleCallback
simpleCallback
=
new
ItemTouchHelper
.
SimpleCallback
(
0
,
ItemTouchHelper
.
LEFT
|
ItemTouchHelper
.
RIGHT
)
{
@Override
public
boolean
onMove
(
RecyclerView
recyclerView
,
RecyclerView
.
ViewHolder
viewHolder
,
RecyclerView
.
ViewHolder
target
)
{
return
false
;
}
public
void
onChildDraw
(
Canvas
c
,
RecyclerView
recyclerView
,
RecyclerView
.
ViewHolder
viewHolder
,
float
dX
,
float
dY
,
int
actionState
,
boolean
isCurrentlyActive
)
{
if
(
actionState
==
ItemTouchHelper
.
ACTION_STATE_SWIPE
)
{
// Fade out the view when it is swiped out of the parent
final
float
alpha
=
1.0f
-
Math
.
abs
(
dX
)
/
(
float
)
viewHolder
.
itemView
.
getWidth
();
viewHolder
.
itemView
.
setAlpha
(
alpha
);
viewHolder
.
itemView
.
setTranslationX
(
dX
);
}
else
{
super
.
onChildDraw
(
c
,
recyclerView
,
viewHolder
,
dX
,
dY
,
actionState
,
isCurrentlyActive
);
}
}
@Override
public
void
onSwiped
(
final
RecyclerView
.
ViewHolder
viewHolder
,
int
direction
)
{
final
int
position
=
viewHolder
.
getAdapterPosition
();
//swiped position
final
String
id
=
Utils
.
notificationCache
.
get
(
position
).
getNotificationId
().
toString
();
Utils
.
notificationCache
.
remove
(
position
);
notificationsAdapter
.
notifyItemRemoved
(
position
);
Utils
.
getRetrofitInterface
().
markNotificationDeleted
(
Utils
.
getSessionIDHeader
(),
id
).
enqueue
(
new
EmptyCallback
<
Void
>());
NotificationId
.
setCurrentCount
(
Utils
.
notificationCache
.
size
());
ShortcutBadger
.
applyCount
(
getContext
().
getApplicationContext
(),
NotificationId
.
getCurrentCount
());
}
};
ItemTouchHelper
itemTouchHelper
=
new
ItemTouchHelper
(
simpleCallback
);
itemTouchHelper
.
attachToRecyclerView
(
notificationsRecyclerView
);
}
else
{
}
else
{
notificationsAdapter
.
setList
(
notifications
);
notificationsAdapter
.
setList
(
notifications
);
notificationsAdapter
.
notifyDataSetChanged
();
notificationsAdapter
.
notifyDataSetChanged
();
...
...
app/src/main/java/app/insti/fragment/SettingsFragment.java
View file @
3124030c
...
@@ -174,6 +174,7 @@ public class SettingsFragment extends Fragment {
...
@@ -174,6 +174,7 @@ public class SettingsFragment extends Fragment {
public
void
onResponse
(
Call
<
Void
>
call
,
Response
<
Void
>
response
)
{
public
void
onResponse
(
Call
<
Void
>
call
,
Response
<
Void
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
sessionManager
.
logout
();
sessionManager
.
logout
();
Utils
.
clearCookies
(
getActivity
());
Intent
intent
=
new
Intent
(
getContext
(),
LoginActivity
.
class
);
Intent
intent
=
new
Intent
(
getContext
(),
LoginActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
getActivity
().
finish
();
getActivity
().
finish
();
...
...
app/src/main/java/app/insti/notifications/NotificationId.java
View file @
3124030c
...
@@ -4,7 +4,24 @@ import java.util.concurrent.atomic.AtomicInteger;
...
@@ -4,7 +4,24 @@ import java.util.concurrent.atomic.AtomicInteger;
public
class
NotificationId
{
public
class
NotificationId
{
private
final
static
AtomicInteger
c
=
new
AtomicInteger
(
0
);
private
final
static
AtomicInteger
c
=
new
AtomicInteger
(
0
);
private
final
static
AtomicInteger
current_count
=
new
AtomicInteger
(
0
);
public
static
int
getID
()
{
public
static
int
getID
()
{
return
c
.
incrementAndGet
();
return
c
.
incrementAndGet
();
}
}
public
static
int
getCurrentCount
()
{
return
current_count
.
get
();
}
public
static
int
decrementAndGetCurrentCount
()
{
if
(
current_count
.
get
()
>
0
)
return
current_count
.
decrementAndGet
();
else
return
0
;
}
public
static
void
setCurrentCount
(
int
count
)
{
current_count
.
set
(
count
);
}
}
}
app/src/main/java/com/mrane/zoomview/CampusMapView.java
View file @
3124030c
...
@@ -74,6 +74,7 @@ public class CampusMapView extends SubsamplingScaleImageView {
...
@@ -74,6 +74,7 @@ public class CampusMapView extends SubsamplingScaleImageView {
private
float
density
;
private
float
density
;
private
boolean
isFirstLoad
=
true
;
private
boolean
isFirstLoad
=
true
;
private
SettingsManager
settingsManager
;
private
SettingsManager
settingsManager
;
private
String
initialMarkerName
=
null
;
public
CampusMapView
(
Context
context
)
{
public
CampusMapView
(
Context
context
)
{
this
(
context
,
null
);
this
(
context
,
null
);
...
@@ -100,6 +101,14 @@ public class CampusMapView extends SubsamplingScaleImageView {
...
@@ -100,6 +101,14 @@ public class CampusMapView extends SubsamplingScaleImageView {
RATIO_SHOW_PIN_TEXT
=
ratio
;
RATIO_SHOW_PIN_TEXT
=
ratio
;
}
}
public
String
getInitialMarkerName
()
{
return
initialMarkerName
;
}
public
void
setInitialMarkerName
(
String
initialMarkerName
)
{
this
.
initialMarkerName
=
initialMarkerName
;
}
private
void
initialise
()
{
private
void
initialise
()
{
displayMetrics
=
getResources
().
getDisplayMetrics
();
displayMetrics
=
getResources
().
getDisplayMetrics
();
density
=
displayMetrics
.
density
;
density
=
displayMetrics
.
density
;
...
@@ -119,11 +128,31 @@ public class CampusMapView extends SubsamplingScaleImageView {
...
@@ -119,11 +128,31 @@ public class CampusMapView extends SubsamplingScaleImageView {
if
(
isFirstLoad
)
{
if
(
isFirstLoad
)
{
Runnable
runnable
=
new
Runnable
()
{
Runnable
runnable
=
new
Runnable
()
{
public
void
run
()
{
public
void
run
()
{
AnimationBuilder
anim
;
// Center marker on start
anim
=
animateScaleAndCenter
(
Marker
centerMarker
=
null
;
getTargetMinScale
(),
MapFragment
.
MAP_CENTER
);
anim
.
withDuration
(
MapFragment
.
DURATION_INIT_MAP_ANIM
)
// Iterate all markers
.
start
();
if
(
getInitialMarkerName
()
!=
null
)
{
for
(
Marker
m
:
markerList
)
{
if
(
m
.
getName
().
equals
(
getInitialMarkerName
()))
{
centerMarker
=
m
;
break
;
}
}
}
// If a marker is to be centered
if
(
centerMarker
!=
null
)
{
setAndShowResultMarker
(
centerMarker
);
}
else
{
AnimationBuilder
anim
;
anim
=
animateScaleAndCenter
(
getTargetMinScale
(),
MapFragment
.
MAP_CENTER
);
anim
.
withDuration
(
MapFragment
.
DURATION_INIT_MAP_ANIM
)
.
start
();
}
// Don't do this again
isFirstLoad
=
false
;
isFirstLoad
=
false
;
}
}
};
};
...
...
app/src/main/res/color/mcv_text_date_light.xml
0 → 100644
View file @
3124030c
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:enterFadeDuration=
"@android:integer/config_shortAnimTime"
android:exitFadeDuration=
"@android:integer/config_shortAnimTime"
>
<item
android:state_checked=
"true"
android:color=
"@color/secondaryTextColor"
/>
<item
android:state_pressed=
"true"
android:color=
"@color/secondaryTextColor"
/>
<item
android:state_enabled=
"false"
android:color=
"#BBBBBB"
/>
<item
android:color=
"@color/secondaryTextColor"
/>
</selector>
app/src/main/res/drawable/ic_keyboard_arrow_left_white_24dp.xml
0 → 100644
View file @
3124030c
<vector
android:height=
"24dp"
android:tint=
"#FFFFFF"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15.41,16.09l-4.58,-4.59 4.58,-4.59L14,5.5l-6,6 6,6z"
/>
</vector>
app/src/main/res/drawable/ic_keyboard_arrow_right_white_24dp.xml
0 → 100644
View file @
3124030c
<vector
android:height=
"24dp"
android:tint=
"#FFFFFF"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
android:width=
"24dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M8.59,16.34l4.58,-4.59 -4.58,-4.59L10,5.75l6,6 -6,6z"
/>
</vector>
app/src/main/res/layout/fragment_body.xml
View file @
3124030c
...
@@ -67,18 +67,7 @@
...
@@ -67,18 +67,7 @@
android:visibility=
"visible"
android:visibility=
"visible"
android:layout_gravity=
"end|bottom"
/>
android:layout_gravity=
"end|bottom"
/>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
<app.insti.TouchImageView
<app.insti.TouchImageView
android:id=
"@+id/expanded_image_body"
android:id=
"@+id/expanded_image_body"
...
...
app/src/main/res/layout/fragment_calendar.xml
View file @
3124030c
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<android.support.v4.widget.NestedScrollView
<android.support.v4.widget.NestedScrollView
android:id=
"@+id/calendar_nsv"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
...
@@ -10,7 +11,8 @@
...
@@ -10,7 +11,8 @@
android:id=
"@+id/calendar_layout"
android:id=
"@+id/calendar_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"gone"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -20,14 +22,19 @@
...
@@ -20,14 +22,19 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_height=
"60dp"
android:background=
"@color/colorPrimary"
/>
android:background=
"@color/colorPrimary"
/>
<CalendarView
<
com.prolificinteractive.materialcalendarview.Material
CalendarView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/simpleCalendarView"
android:id=
"@+id/simpleCalendarView"
android:layout_width=
"
fill
_parent"
android:layout_width=
"
match
_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:focusedMonthDateColor=
"#000000"
app:mcv_showOtherDates=
"all"
android:unfocusedMonthDateColor=
"#FFFFFF"
/>
app:mcv_selectionColor=
"@color/colorPrimary"
app:mcv_headerTextAppearance=
"@style/MatCalendarHeader"
app:mcv_leftArrow=
"@drawable/ic_keyboard_arrow_left_white_24dp"
app:mcv_rightArrow=
"@drawable/ic_keyboard_arrow_right_white_24dp"
app:mcv_dateTextAppearance=
"@style/CalendarDateAppearance"
android:padding=
"5dp"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -70,19 +77,8 @@
...
@@ -70,19 +77,8 @@
android:layout_margin=
"16dp"
android:layout_margin=
"16dp"
android:src=
"@drawable/ic_add_black_24dp"
android:src=
"@drawable/ic_add_black_24dp"
android:tint=
"@android:color/black"
android:tint=
"@android:color/black"
android:visibility=
"
gon
e"
/>
android:visibility=
"
invisibl
e"
/>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_complaint.xml
View file @
3124030c
...
@@ -37,18 +37,6 @@
...
@@ -37,18 +37,6 @@
</android.support.design.widget.CoordinatorLayout>
</android.support.design.widget.CoordinatorLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<!--Progress Bar will show unless the data is being loaded-->
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
app/src/main/res/layout/fragment_event.xml
View file @
3124030c
...
@@ -119,37 +119,6 @@
...
@@ -119,37 +119,6 @@
android:text=
"No Date Specified"
android:text=
"No Date Specified"
android:textColor=
"@color/colorWhite"
android:textColor=
"@color/colorWhite"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
" | "
android:textColor=
"@color/colorWhite"
android:textSize=
"20sp"
/>
<TextView
android:id=
"@+id/event_page_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"No Time Specified"
android:textColor=
"@color/colorWhite"
android:textSize=
"16sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
" | "
android:textColor=
"@color/colorWhite"
android:textSize=
"20sp"
/>
<TextView
android:id=
"@+id/event_page_venue"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:text=
"Venue"
android:textColor=
"@color/colorWhite"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
@@ -235,7 +204,7 @@
...
@@ -235,7 +204,7 @@
android:layout_margin=
"16dp"
android:layout_margin=
"16dp"
android:src=
"@drawable/ic_edit_black_24dp"
android:src=
"@drawable/ic_edit_black_24dp"
android:tint=
"@android:color/black"
android:tint=
"@android:color/black"
android:visibility=
"
gon
e"
/>
android:visibility=
"
invisibl
e"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/fragment_explore.xml
View file @
3124030c
...
@@ -40,17 +40,6 @@
...
@@ -40,17 +40,6 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_feed.xml
View file @
3124030c
...
@@ -26,18 +26,8 @@
...
@@ -26,18 +26,8 @@
android:layout_margin=
"16dp"
android:layout_margin=
"16dp"
android:src=
"@drawable/ic_add_black_24dp"
android:src=
"@drawable/ic_add_black_24dp"
android:tint=
"@android:color/black"
android:tint=
"@android:color/black"
android:visibility=
"
gon
e"
/>
android:visibility=
"
invisibl
e"
/>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_map.xml
View file @
3124030c
...
@@ -33,18 +33,11 @@
...
@@ -33,18 +33,11 @@
android:id=
"@+id/main_container"
android:id=
"@+id/main_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/darker_gray"
android:focusable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:focusableInTouchMode=
"true"
tools:context=
"com.mrane.campusmap.MainActivity"
tools:context=
"com.mrane.campusmap.MainActivity"
tools:ignore=
"MergeRootFrame"
>
tools:ignore=
"MergeRootFrame"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
></LinearLayout>
<com.mrane.navigation.SlidingUpPanelLayout
<com.mrane.navigation.SlidingUpPanelLayout
android:id=
"@+id/sliding_layout"
android:id=
"@+id/sliding_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -75,18 +68,7 @@
...
@@ -75,18 +68,7 @@
</android.support.v4.widget.DrawerLayout>
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -101,7 +83,8 @@
...
@@ -101,7 +83,8 @@
android:layout_marginBottom=
"96dp"
android:layout_marginBottom=
"96dp"
android:layout_marginRight=
"8dp"
android:layout_marginRight=
"8dp"
android:src=
"@drawable/ic_my_location_black_24dp"
android:src=
"@drawable/ic_my_location_black_24dp"
android:tint=
"@android:color/black"
/>
android:tint=
"@android:color/black"
android:visibility=
"invisible"
/>
</RelativeLayout>
</RelativeLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_mess_menu.xml
View file @
3124030c
...
@@ -37,16 +37,6 @@
...
@@ -37,16 +37,6 @@
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_news.xml
View file @
3124030c
...
@@ -18,16 +18,6 @@
...
@@ -18,16 +18,6 @@
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
app/src/main/res/layout/fragment_notifications.xml
View file @
3124030c
...
@@ -9,17 +9,6 @@
...
@@ -9,17 +9,6 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</FrameLayout>
</FrameLayout>
app/src/main/res/layout/fragment_placement_blog.xml
View file @
3124030c
...
@@ -18,16 +18,6 @@
...
@@ -18,16 +18,6 @@
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
app/src/main/res/layout/fragment_quick_links.xml
View file @
3124030c
...
@@ -9,7 +9,9 @@
...
@@ -9,7 +9,9 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:padding=
"8dp"
>
android:paddingLeft=
"15dp"
android:paddingTop=
"0dp"
android:paddingBottom=
"5dp"
>
<TextView
<TextView
style=
"@style/QuickLinksHeading"
style=
"@style/QuickLinksHeading"
...
...
app/src/main/res/layout/fragment_training_blog.xml
View file @
3124030c
...
@@ -18,16 +18,6 @@
...
@@ -18,16 +18,6 @@
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
app/src/main/res/layout/fragment_user.xml
View file @
3124030c
...
@@ -10,24 +10,24 @@
...
@@ -10,24 +10,24 @@
tools:context=
"app.insti.fragment.UserFragment"
tools:context=
"app.insti.fragment.UserFragment"
android:background=
"?attr/themeColor"
>
android:background=
"?attr/themeColor"
>
<
Relative
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<de.hdodenhof.circleimageview.CircleImageView
<de.hdodenhof.circleimageview.CircleImageView
android:id=
"@+id/user_profile_picture_profile"
android:id=
"@+id/user_profile_picture_profile"
android:layout_width=
"1
0
0dp"
android:layout_width=
"1
1
0dp"
android:layout_height=
"1
0
0dp"
android:layout_height=
"1
1
0dp"
android:layout_margin=
"
20
dp"
android:layout_margin=
"
15
dp"
android:
layout_marginRight=
"15dp
"
android:
transitionName=
"sharedAvatar
"
android:
transitionName=
"sharedAvatar
"
/>
android:
layout_gravity=
"center_vertical
"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:orientation=
"vertical"
android:layout_toEndOf=
"@id/user_profile_picture_profile"
android:layout_gravity=
"center_vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:id=
"@+id/user_name_profile"
android:id=
"@+id/user_name_profile"
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
android:tint=
"?attr/themeColorInverse"
android:tint=
"?attr/themeColorInverse"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</
Relative
Layout>
</
Linear
Layout>
<android.support.design.widget.TabLayout
<android.support.design.widget.TabLayout
android:id=
"@+id/tab_layout"
android:id=
"@+id/tab_layout"
...
@@ -104,18 +104,7 @@
...
@@ -104,18 +104,7 @@
</LinearLayout>
</LinearLayout>
<RelativeLayout
<include
layout=
"@layout/loading_panel"
/>
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
<app.insti.TouchImageView
<app.insti.TouchImageView
android:id=
"@+id/expanded_image_profile"
android:id=
"@+id/expanded_image_profile"
...
...
app/src/main/res/layout/loading_panel.xml
0 → 100644
View file @
3124030c
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width=
"220dp"
android:layout_height=
"220dp"
android:scaleType=
"centerInside"
app:lottie_rawRes=
"@raw/logoanim"
app:lottie_loop=
"true"
app:lottie_autoPlay=
"true"
/>
</RelativeLayout>
app/src/main/res/raw/logoanim.json
0 → 100644
View file @
3124030c
{
"v"
:
"5.4.3"
,
"fr"
:
29.9700012207031
,
"ip"
:
0
,
"op"
:
65.0000026475043
,
"w"
:
512
,
"h"
:
512
,
"nm"
:
"Main"
,
"ddd"
:
0
,
"assets"
:[{
"id"
:
"image_0"
,
"w"
:
82
,
"h"
:
200
,
"u"
:
""
,
"p"
:
"data:image/png;base64,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"
,
"e"
:
1
}],
"layers"
:[{
"ddd"
:
0
,
"ind"
:
1
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
0
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
15
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
30
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
45.0000018328876
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
-67
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
-1.00000004073083
,
"op"
:
899.000036617021
,
"st"
:
-1.00000004073083
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
2
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
2
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
17
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
32
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
47.0000019143492
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
-45
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
3
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
4
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
19
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
34
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
49.0000019958109
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
-20
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
4
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
6
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
21
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
36
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
51.0000020772726
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
5
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
8
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
23
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
38
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
53.0000021587343
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
20
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
6
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
10
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
25
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
40
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
55.0000022401959
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
45
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
7
,
"ty"
:
2
,
"nm"
:
"petal.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.948
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p948_0p167_0p167"
],
"t"
:
12
,
"s"
:[
15
],
"e"
:[
55
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
-0.139
]},
"n"
:[
"0p833_0p833_0p167_-0p139"
],
"t"
:
27
,
"s"
:[
55
],
"e"
:[
40
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
0.833
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0.167
]},
"n"
:[
"0p833_0p833_0p167_0p167"
],
"t"
:
42
,
"s"
:[
40
],
"e"
:[
15
]},{
"t"
:
57.0000023216576
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
67
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
256
,
330
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
41
,
200
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
900.000036657751
,
"st"
:
0
,
"bm"
:
0
}],
"markers"
:[]}
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
3124030c
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
<item
name=
"android:paddingBottom"
>
8dp
</item>
<item
name=
"android:paddingBottom"
>
8dp
</item>
<item
name=
"android:textColor"
>
?attr/themeColorInverse
</item>
<item
name=
"android:textColor"
>
?attr/themeColorInverse
</item>
<item
name=
"android:textSize"
>
36sp
</item>
<item
name=
"android:textSize"
>
36sp
</item>
<item
name=
"android:fontFamily"
>
sans-serif-light
</item>
</style>
</style>
<style
name=
"QuickLink"
>
<style
name=
"QuickLink"
>
...
@@ -77,4 +78,15 @@
...
@@ -77,4 +78,15 @@
<item
name=
"android:windowEnterAnimation"
>
@android:anim/fade_in
</item>
<item
name=
"android:windowEnterAnimation"
>
@android:anim/fade_in
</item>
<item
name=
"android:windowExitAnimation"
>
@android:anim/fade_out
</item>
<item
name=
"android:windowExitAnimation"
>
@android:anim/fade_out
</item>
</style>
</style>
<style
name=
"MatCalendarHeader"
parent=
"TextAppearance.MaterialCalendarWidget.Header"
>
<item
name=
"android:textColor"
>
@color/primaryTextColor
</item>
<item
name=
"android:textStyle"
>
normal
</item>
<item
name=
"android:textSize"
>
16sp
</item>
</style>
<style
name=
"CalendarDateAppearance"
parent=
"TextAppearance.AppCompat.Medium"
>
<item
name=
"android:textColor"
>
@color/mcv_text_date_light
</item>
<item
name=
"android:textSize"
>
14sp
</item>
</style>
</resources>
</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