shahidbits
shahidbits

Reputation: 141

How to achieve this effect while listview is loading with items in android?

Lately, this kind of effect is gaining lot of popularity. While items are being populated, listview shows this kind of affect. What exactly is this and how can one implement it. Thanks!

ListView loadiing effect in android

Upvotes: 2

Views: 1526

Answers (3)

Shakiv Hussain
Shakiv Hussain

Reputation: 21

You can use this library to achive loading effect.

// Gradle dependency on Shimmer for Android

dependencies {
  implementation 'com.facebook.shimmer:shimmer:0.5.0'
}
    

Official documentation Shimmer Effect

Upvotes: 0

Kunal Chawla
Kunal Chawla

Reputation: 1314

Check out the LoaderViewLibrary on Github.

The description matches your requirements -

Library that enables TextView of ImageView to show loading animation while waiting for the text and image get loaded

Upvotes: 1

Mukesh Y.
Mukesh Y.

Reputation: 949

Create a dummy layout exactly similar to what you want o show on pre-loading and then set it to listView on Empaty method,like this.

View emptyView = findViewById(R.id.empty_view); 
 listView.setEmptyView(emptyView); 

Upvotes: 0

Related Questions