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
4a69f872
Commit
4a69f872
authored
Sep 29, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use resized images in notification adapter
parent
a24109f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
app/src/main/java/app/insti/adapter/NotificationsAdapter.java
...src/main/java/app/insti/adapter/NotificationsAdapter.java
+7
-2
No files found.
app/src/main/java/app/insti/adapter/NotificationsAdapter.java
View file @
4a69f872
...
@@ -13,6 +13,7 @@ import com.squareup.picasso.Picasso;
...
@@ -13,6 +13,7 @@ import com.squareup.picasso.Picasso;
import
java.util.List
;
import
java.util.List
;
import
app.insti.Constants
;
import
app.insti.ItemClickListener
;
import
app.insti.ItemClickListener
;
import
app.insti.R
;
import
app.insti.R
;
import
app.insti.data.Event
;
import
app.insti.data.Event
;
...
@@ -53,11 +54,15 @@ public class NotificationsAdapter extends RecyclerView.Adapter<NotificationsAdap
...
@@ -53,11 +54,15 @@ public class NotificationsAdapter extends RecyclerView.Adapter<NotificationsAdap
viewholder
.
notificationVerb
.
setText
(
appNotification
.
getNotificationVerb
());
viewholder
.
notificationVerb
.
setText
(
appNotification
.
getNotificationVerb
());
if
(
appNotification
.
getNotificationActorType
().
contains
(
"event"
))
{
if
(
appNotification
.
getNotificationActorType
().
contains
(
"event"
))
{
Event
event
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
Event
.
class
);
Event
event
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
Event
.
class
);
Picasso
.
get
().
load
(
event
.
getEventImageURL
()).
into
(
viewholder
.
notificationPicture
);
Picasso
.
get
().
load
(
Constants
.
resizeImageUrl
(
event
.
getEventImageURL
(),
200
)
).
into
(
viewholder
.
notificationPicture
);
viewholder
.
notificationTitle
.
setText
(
event
.
getEventName
());
viewholder
.
notificationTitle
.
setText
(
event
.
getEventName
());
}
else
if
(
appNotification
.
getNotificationActorType
().
contains
(
"newsentry"
))
{
}
else
if
(
appNotification
.
getNotificationActorType
().
contains
(
"newsentry"
))
{
NewsArticle
article
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
NewsArticle
.
class
);
NewsArticle
article
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
NewsArticle
.
class
);
Picasso
.
get
().
load
(
article
.
getBody
().
getBodyImageURL
()).
into
(
viewholder
.
notificationPicture
);
Picasso
.
get
().
load
(
Constants
.
resizeImageUrl
(
article
.
getBody
().
getBodyImageURL
(),
200
)
).
into
(
viewholder
.
notificationPicture
);
viewholder
.
notificationTitle
.
setText
(
article
.
getTitle
());
viewholder
.
notificationTitle
.
setText
(
article
.
getTitle
());
}
else
if
(
appNotification
.
getNotificationActorType
().
contains
(
"blogentry"
))
{
}
else
if
(
appNotification
.
getNotificationActorType
().
contains
(
"blogentry"
))
{
PlacementBlogPost
post
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
PlacementBlogPost
.
class
);
PlacementBlogPost
post
=
gson
.
fromJson
(
gson
.
toJson
(
appNotification
.
getNotificationActor
()),
PlacementBlogPost
.
class
);
...
...
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