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
1e658043
Commit
1e658043
authored
Jul 11, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add loading spinner to notifications
parent
692277e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
app/src/main/java/app/insti/fragment/NotificationsFragment.java
...c/main/java/app/insti/fragment/NotificationsFragment.java
+6
-0
app/src/main/res/layout/fragment_notifications.xml
app/src/main/res/layout/fragment_notifications.xml
+12
-0
No files found.
app/src/main/java/app/insti/fragment/NotificationsFragment.java
View file @
1e658043
...
@@ -75,6 +75,12 @@ public class NotificationsFragment extends BaseFragment {
...
@@ -75,6 +75,12 @@ public class NotificationsFragment extends BaseFragment {
}
}
private
void
showNotifications
(
final
List
<
Notification
>
notifications
)
{
private
void
showNotifications
(
final
List
<
Notification
>
notifications
)
{
/* Check if activity is done with */
if
(
getActivity
()
==
null
)
return
;
/* Hide loader */
getActivity
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
NotificationsAdapter
notificationsAdapter
=
new
NotificationsAdapter
(
notifications
,
new
ItemClickListener
()
{
NotificationsAdapter
notificationsAdapter
=
new
NotificationsAdapter
(
notifications
,
new
ItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
View
v
,
int
position
)
{
public
void
onItemClick
(
View
v
,
int
position
)
{
...
...
app/src/main/res/layout/fragment_notifications.xml
View file @
1e658043
...
@@ -9,4 +9,16 @@
...
@@ -9,4 +9,16 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
<RelativeLayout
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"
/>
</RelativeLayout>
</FrameLayout>
</FrameLayout>
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