Well ,in advanced mobile applications or normal ones , a developer should communicate with the user using some feed backs so changing the color of an image or label when clicked gives the user the feedback that he has really clicked something, here how it is done :-
In your onClick() method , use the following method :
-setColorFilter("color in hexa" , "mode") , in my case I use
-button.setColorFilter(0x77000000,Mode.SRC_ATOP);
doing this you will change the Colour but if you pressed the back button , you will find it stuck on the colour you changed ,to return things as they were you can either use -setColorFilter(null) or setColorfilter(Color.TRANSPARENT,Mode.SRC_ATOP)
I use setColorFilter(null) and this does the trick for me
This blog brings news and updates about computer networks, telecommunication networks and mobile development world wide. Also it is the place where I enjoy writing my previous experiences with the different networking fields.
Google Android News Android Forums
PCWorld How-To's and Tips
- PNY LX3030 SSD review: Incredible durability for twice the price
- Aukey PowerTitan 300 review: A well-designed, affordable power station worth every penny
- Pick the perfect motherboard with these 5 tips
- Sony WF-1000XM4 review: These noise-canceling earbuds have all-around appeal
- How to update your PC's BIOS
No comments:
Post a Comment