1

I am trying to create an application which implements a MenuDrawer (using the android-menudrawer library of SimonVT).

I started using, as a base, the example left menu. It uses an arrow to indicate which element is active.

My question is, how can I make the active item is displayed with a different color of background and not an image.

xAnubiSx
  • 51
  • 1
  • 9
  • see here http://stackoverflow.com/questions/15810316/highlighting-selected-item-in-menu-drawer-sliding-menu – Hardik Nov 27 '13 at 12:37
  • The method setSelectionHandlerColorResource() is undefined for the type View, and the problem wasn't solved – xAnubiSx Nov 27 '13 at 13:36

1 Answers1

0

In your adapter put the following in side getView() view.setSelectionHandlerColorResource(Set your color here);

like :

public View getView(int position, View convertView, ViewGroup parent) {
    view.setSelectionHandlerColorResource(Set your color here);
}
Pradip
  • 3,189
  • 3
  • 22
  • 27
  • The method setSelectionHandlerColorResource() is undefined for the type View – xAnubiSx Nov 27 '13 at 13:36
  • Replace with equivalent method to set color for your method. – Pradip Nov 27 '13 at 15:39
  • Yes, that may be an alternative, the method is view.setBackgroundColor(color). As I watched, with the library is not possible. I'll have to implement some code to reset the default background and set the background of the selected item. – xAnubiSx Nov 27 '13 at 20:26