public void showVoice(boolean show) {
        if (show && isVoiceAvailable() && allowVoiceSearch) {
            mVoiceBtn.setVisibility(VISIBLE);
        } else {
            mVoiceBtn.setVisibility(GONE);
        }
    }
if show is true, this will enable voice search. If voice is not available on the device, this method call has not effect.

@param show
android/third_party/search/src/main/java/com/miguelcatalan/materialsearchview/MaterialSearchView.java