Advertisement
shmoula

Untitled

Jun 17th, 2013
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <menu xmlns:android="http://schemas.android.com/apk/res/android">
  3. <item android:id="@+id/menu_gather"
  4. android:title="@string/gather"
  5. android:icon="@drawable/ic_menu_drop_disabled"
  6. android:enabled="true"
  7. android:orderInCategory="0"
  8. android:showAsAction="always" />
  9.  
  10. private void refreshActionButtonsState() {
  11. if(isInRange() & atPosition.isHasWater())
  12. setActionButton(R.id.menu_gather, R.drawable.ic_menu_drop);
  13. else
  14. setActionButton(R.id.menu_gather, R.drawable.ic_menu_drop_disabled);
  15. }
  16.  
  17. public void onTaskFinished(final Object result) {
  18. // type checks . . .
  19. parentActivity.runOnUiThread(new Runnable() {
  20. @Override
  21. public void run() {
  22. refreshActionButtonsState();
  23. }
  24. });
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement