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_plant"
- android:title="@string/plant"
- android:icon="@drawable/ic_menu_plant_disabled"
- android:enabled="true"
- android:orderInCategory="0"
- android:showAsAction="always" />
- private void refreshContent(Spot atPosition) {
- if(atPosition == null & parentActivity.isLocationFixed())
- setActionButton(R.id.menu_plant, R.drawable.ic_menu_plant);
- else
- setActionButton(R.id.menu_plant, R.drawable.ic_menu_plant_disabled);
- }
- public void onTaskFinished(final Object result) {
- // type checks...
- // ...
- parentActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- refreshContent(atPosition);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement