siyamed / android-satellite-menu

Android Satellite Menu
1.4k stars 644 forks source link

redraw satellite items #21

Open adam1liukuro opened 10 years ago

adam1liukuro commented 10 years ago

I want to redraw the items so it can display which item is selected I changed the addItems function from the library to reset the menuitems every time, so it won't be adding more and more items .

This is my code

initarc(menu_x,"x"); menu_x.setOnItemClickedListener(new SateliteClickedListener() { public void eventOccured(int argx) { initarc(menu_x,"x"); } });

initarc is the function to add items and determine which item is selected so it will display a different icon

the problem is when i click an item, the main satellite is unclickable anymore (no action when clicked) but then if I press home and resume the app, then the items are displayed.

something is wrong when adding items from the itemclicklistener, because if i call initarc twice without the listener everything works fine.

Really need some help here! Thanks.