Created
May 28, 2019 06:50
-
-
Save raushankrjha/4f24293acd5c4882f809583cced194cb 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
package com.example.shimmereffectexample; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import com.facebook.shimmer.ShimmerFrameLayout; | |
public class MainActivity extends AppCompatActivity { | |
ShimmerFrameLayout mShimmerViewContainer; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mShimmerViewContainer = findViewById(R.id.shimmer_view_container); | |
} | |
@Override | |
public void onResume() { | |
super.onResume(); | |
mShimmerViewContainer.startShimmerAnimation(); | |
} | |
@Override | |
public void onPause() { | |
mShimmerViewContainer.stopShimmerAnimation(); | |
super.onPause(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment