How to create a menu in android fully animated

Asked

Viewed 52 times

0

O menu do 2º celular

The tumblr app has a menu that when you press each item/button it turns white and press another turn the original color. Does anyone know the name of this process to indicate to the user that that button was clicked?

1 answer

1

You can use setColorFilter in the icon click action. See the example:

 img1.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        img1.setColorFilter(0xff00aa00, PorterDuff.Mode.MULTIPLY);
        img2.clearColorFilter();
        img3.clearColorFilter();
    }
});

put 'onclick' as an example, in the case of the menu, you use colorFilter in the menu action...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.