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
d9436642
Commit
d9436642
authored
Jul 21, 2019
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add empty list animation
parent
4c582a05
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-0
app/src/main/java/app/insti/fragment/FeedFragment.java
app/src/main/java/app/insti/fragment/FeedFragment.java
+7
-0
app/src/main/res/layout/fragment_feed.xml
app/src/main/res/layout/fragment_feed.xml
+1
-0
app/src/main/res/layout/nothing_found.xml
app/src/main/res/layout/nothing_found.xml
+18
-0
app/src/main/res/raw/nothing_found_anim.json
app/src/main/res/raw/nothing_found_anim.json
+1
-0
No files found.
app/src/main/java/app/insti/fragment/FeedFragment.java
View file @
d9436642
...
...
@@ -177,6 +177,13 @@ public class FeedFragment extends BaseFragment {
View
view
=
getActivity
().
findViewById
(
R
.
id
.
loadingPanel
);
if
(
view
!=
null
)
view
.
setVisibility
(
View
.
GONE
);
// Check if nothing was found
if
(
events
.
size
()
==
0
)
{
view
=
getActivity
().
findViewById
(
R
.
id
.
nothingFound
);
if
(
view
!=
null
)
view
.
setVisibility
(
View
.
VISIBLE
);
}
}
private
void
initRecyclerView
()
{
...
...
app/src/main/res/layout/fragment_feed.xml
View file @
d9436642
...
...
@@ -29,5 +29,6 @@
android:visibility=
"invisible"
/>
<include
layout=
"@layout/loading_panel"
/>
<include
layout=
"@layout/nothing_found"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/nothing_found.xml
0 → 100644
View file @
d9436642
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/nothingFound"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:visibility=
"gone"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width=
"320dp"
android:layout_height=
"320dp"
android:scaleType=
"fitCenter"
app:lottie_rawRes=
"@raw/nothing_found_anim"
app:lottie_loop=
"true"
app:lottie_autoPlay=
"true"
/>
</RelativeLayout>
app/src/main/res/raw/nothing_found_anim.json
0 → 100644
View file @
d9436642
This diff is collapsed.
Click to expand it.
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