Advertisement
shmoula

Untitled

Jun 17th, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 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_plant"
  4. android:title="@string/plant"
  5. android:icon="@drawable/ic_menu_plant_disabled"
  6. android:enabled="true"
  7. android:orderInCategory="0"
  8. android:showAsAction="always" />
  9.  
  10. private void refreshContent(Spot atPosition) {
  11. if(atPosition == null & parentActivity.isLocationFixed())
  12. setActionButton(R.id.menu_plant, R.drawable.ic_menu_plant);
  13. else
  14. setActionButton(R.id.menu_plant, R.drawable.ic_menu_plant_disabled);
  15. }
  16.  
  17. public void onTaskFinished(final Object result) {
  18. // type checks...
  19. // ...
  20. parentActivity.runOnUiThread(new Runnable() {
  21. @Override
  22. public void run() {
  23. refreshContent(atPosition);
  24. }
  25. });
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement