Commit 4ae885ee authored by Craig Earley's avatar Craig Earley
Browse files

refactors the code that sets action view of the refresh icon to null

parent 8a4dcd99
...@@ -27,7 +27,6 @@ import android.widget.TextView; ...@@ -27,7 +27,6 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.core.view.MenuItemCompat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -69,7 +68,8 @@ public class SensorScanActivity extends ListActivity { ...@@ -69,7 +68,8 @@ public class SensorScanActivity extends ListActivity {
if (!scanning) { if (!scanning) {
menu.findItem(R.id.menu_stop).setVisible(false); menu.findItem(R.id.menu_stop).setVisible(false);
menu.findItem(R.id.menu_scan).setVisible(true); menu.findItem(R.id.menu_scan).setVisible(true);
MenuItemCompat.setActionView(menu.findItem(R.id.menu_refresh), null); MenuItem refreshItem = menu.findItem(R.id.menu_refresh);
refreshItem.setActionView(null);
} else { } else {
menu.findItem(R.id.menu_stop).setVisible(true); menu.findItem(R.id.menu_stop).setVisible(true);
menu.findItem(R.id.menu_scan).setVisible(false); menu.findItem(R.id.menu_scan).setVisible(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment