I have a layout file with 6 image buttons. Each button should show different source image based selection/focus/noselection. I am able to do this with 6 xml files under drawable folder with selector nodes.
Is there a way to put all these selector nodes in ONE xml file to accomplish the same. Less files means less开发者_如何学C management...
Yes but you must manage it from the code with:
public class MyClass extend Activity implements OnSelect,OnFocus
if you use eclipse write "On" and click ctrl+spaceBar and select what you need and change the icon with myButtonName.src="@drawble/myimageonselect"
精彩评论