I want to show small dots on screen while pressing a button, something like pin code...
switch (view.getId()){
case R.id.buttonNum1:
You can achive by creating ripple effect
create one drawable name like pin_button_ripple in drawable-v21 folder and add bellow code
-
Now in Layout file set it as a background of button and define click listener in activity
You will see the ripple effect in circle shape like we enter Pin number or password via keyboard and showing that effect