I want to make Easter eggs, but I don’t know how to make the event itself and configure the handler to open it after the N-number of clicks, please tell me.

Closed due to the fact that the essence of the issue is incomprehensible by the participants of pavel , cheops , fori1ton , Streletz , Denis 29 Sep '16 at 6:38 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    int n = 5; int countClicks = 0 public void onClick(View view){ count++; if(count == n){ Intent intent = new Intent(this, AnotherActivity.class); startActivity(intent); count = 0; } 

    Pseudocode on the knee, but ideas for the most different taste and color.

    You can generally use a random number generator on some imperceptible element, and check it on if(n % 10 == 0){some code};

    It all depends on your imagination, the question is not very correct.

    • It did not help, if (n% 10 == 0) {some code}; it doesn't work at all. - Pavel Ananiev