1

When I pick a quickly in a button that opens an Intent or a Dialog, it opens it several times.

Is there a way to prevent it?

I could put a flag in each button or disable/enable it like says Shobhit Puri says, but I would like something better, a more elegant way, more flexible, I don't understand why the SDK doesn't provide a native way to do it.

Code is trivial.

    button.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent iVerTienda = new Intent(DashBoard.this,
                    FragmentTabsPdv.class);
            startActivity(iVerTienda);
        }
    });
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
  • There isn't any perfect/native solution to avoid multiple clicks, See these answers: https://stackoverflow.com/a/23103227/2105241 & https://stackoverflow.com/a/20971678/2105241 – Ahmad Raza Nov 14 '14 at 21:51

0 Answers0