Last active
January 18, 2019 11:19
-
-
Save RanjitPati/b5dbfea7b29b0f0d3533fd3030a7bb59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompactActivity{ | |
private ShimmerFrameLayout mShimmerViewContainer; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.screen_businesslist); | |
//initialize the ShimmerLayout | |
mShimmerViewContainer = findViewById(R.id.shimmer_view_container); | |
//now start the Shimmer effect | |
mShimmerViewContainer.startShimmer(); | |
} | |
public void stopShimmerWhenDataFatched(){ | |
//suppose we have finished our server stuffs | |
//and now the data is ready to populate | |
//populate data | |
.............................. | |
................................ | |
//now stop the shimmer and also hide the shimmer layout | |
mShimmerViewContainer.stopShimmer(); | |
mShimmerViewContainer.setVisibility(View.GONE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment