src/main/java/de/blau/android/easyedit/EasyEditManager.java
/**
     * Start an element selection mode based on selected elements
     */
Start an element selection mode based on selected elements
Start an element selection mode based on selected elements
public void startElementSelectionMode() {
        ActionMode.Callback cb = null;
        OsmElement e = null;
        List<OsmElement> selection = logic.getSelectedElements();
        if (selection.size() == 1) {
            e = selection.get(0);
            if (e instanceof Node) {
                cb = new NodeSelectionActionModeCallback(this, (Node) e);
            } else if (e instanceof Way) {
                cb = new WaySelectionActionModeCallback(this, (Way) e);
            } else if (e instanceof Relation) {
                cb = new RelationSelectionActionModeCallback(this, (Relation) e);
            }
        } else {
            cb = new ExtendSelectionActionModeCallback(this, selection);
        }
        if (cb != null && (e != null || !selection.isEmpty())) {
            getMain().startSupportActionMode(cb);
            if (e != null) {
                elementToast(e);
            }
        }
    }
public void startElementSelectionMode ( ) { ActionMode . Callback cb = null ; OsmElement e = null ; List < OsmElement > selection = logic . getSelectedElements ( ) ; if ( selection . size ( ) == 1 ) { e = selection . get ( 0 ) ; if ( e instanceof Node ) { cb = new NodeSelectionActionModeCallback ( this , ( Node ) e ) ; } else if ( e instanceof Way ) { cb = new WaySelectionActionModeCallback ( this , ( Way ) e ) ; } else if ( e instanceof Relation ) { cb = new RelationSelectionActionModeCallback ( this , ( Relation ) e ) ; } } else { cb = new ExtendSelectionActionModeCallback ( this , selection ) ; } if ( cb != null && ( e != null || ! selection . isEmpty ( ) ) ) { getMain ( ) . startSupportActionMode ( cb ) ; if ( e != null ) { elementToast ( e ) ; } } }
Start an element selection mode based on selected elements
Start an element selection mode based on selected elements