protected void setMapScaleBar ( ) { String value = this . sharedPreferences . getString ( SETTING_SCALEBAR , SETTING_SCALEBAR_BOTH ) ; if ( SETTING_SCALEBAR_NONE . equals ( value ) ) { AndroidUtil . setMapScaleBar ( this . mapView , null , null ) ; } else { if ( SETTING_SCALEBAR_BOTH . equals ( value ) ) { AndroidUtil . setMapScaleBar ( this . mapView , MetricUnitAdapter . INSTANCE , ImperialUnitAdapter . INSTANCE ) ; } else if ( SETTING_SCALEBAR_METRIC . equals ( value ) ) { AndroidUtil . setMapScaleBar ( this . mapView , MetricUnitAdapter . INSTANCE , null ) ; } else if ( SETTING_SCALEBAR_IMPERIAL . equals ( value ) ) { AndroidUtil . setMapScaleBar ( this . mapView , ImperialUnitAdapter . INSTANCE , null ) ; } else if ( SETTING_SCALEBAR_NAUTICAL . equals ( value ) ) { AndroidUtil . setMapScaleBar ( this . mapView , NauticalUnitAdapter . INSTANCE , null ) ; } } }
Sets the scale bar from preferences .