Search in sources :

Example 1 with RippleBackground

use of com.skyfishjy.library.RippleBackground in project android-ripple-background by skyfishjy.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final RippleBackground rippleBackground = (RippleBackground) findViewById(R.id.content);
    final Handler handler = new Handler();
    foundDevice = (ImageView) findViewById(R.id.foundDevice);
    ImageView button = (ImageView) findViewById(R.id.centerImage);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            rippleBackground.startRippleAnimation();
            handler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    foundDevice();
                }
            }, 3000);
        }
    });
}
Also used : RippleBackground(com.skyfishjy.library.RippleBackground) Handler(android.os.Handler) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) View(android.view.View)

Example 2 with RippleBackground

use of com.skyfishjy.library.RippleBackground in project UltimateAndroid by cymcsg.

the class RippleBackgroundActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ripple_background_activity_main);
    final RippleBackground rippleBackground = (RippleBackground) findViewById(R.id.content);
    final Handler handler = new Handler();
    foundDevice = (ImageView) findViewById(R.id.foundDevice);
    ImageView button = (ImageView) findViewById(R.id.centerImage);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            rippleBackground.startRippleAnimation();
            handler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    foundDevice();
                }
            }, 3000);
        }
    });
}
Also used : RippleBackground(com.skyfishjy.library.RippleBackground) Handler(android.os.Handler) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) View(android.view.View)

Aggregations

Handler (android.os.Handler)2 View (android.view.View)2 ImageView (android.widget.ImageView)2 RippleBackground (com.skyfishjy.library.RippleBackground)2