Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/menu_gather"
- android:title="@string/gather"
- android:icon="@drawable/ic_menu_drop_disabled"
- android:enabled="true"
- android:orderInCategory="0"
- android:showAsAction="always" />
- private void refreshActionButtonsState() {
- if(isInRange() & atPosition.isHasWater())
- setActionButton(R.id.menu_gather, R.drawable.ic_menu_drop);
- else
- setActionButton(R.id.menu_gather, R.drawable.ic_menu_drop_disabled);
- }
- public void onTaskFinished(final Object result) {
- // type checks . . .
- parentActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- refreshActionButtonsState();
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement