How to set a blurry image Library without Onclick listener

128 views Asked by At

I am trying to set a blur image library from https://github.com/wasabeef/Blurry But I am it is not working without onclick listener here is my java code

 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

  Blurry.with(MainActivity.this)
                        .radius(25)
                        .sampling(2)
                        .async()
                        .animate(500)
                        .onto((ViewGroup) findViewById(R.id.relate));

}

But when I set the blurry under on click listener it works so can some one tell me how I can do this without on click listener

0

There are 0 answers