Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7919bfb1 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Don't show the submit button when it isn't enabled." into ics-mr1

parents 19c86cac cf72ab4d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -728,7 +728,8 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {

    private void updateSubmitButton(boolean hasText) {
        int visibility = GONE;
        if (isSubmitAreaEnabled() && hasFocus() && (hasText || !mVoiceButtonEnabled)) {
        if (mSubmitButtonEnabled && isSubmitAreaEnabled() && hasFocus()
                && (hasText || !mVoiceButtonEnabled)) {
            visibility = VISIBLE;
        }
        mSubmitButton.setVisibility(visibility);
@@ -1082,9 +1083,7 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
        CharSequence text = mQueryTextView.getText();
        mUserQuery = text;
        boolean hasText = !TextUtils.isEmpty(text);
        if (isSubmitButtonEnabled()) {
        updateSubmitButton(hasText);
        }
        updateVoiceButton(!hasText);
        updateCloseButton();
        updateSubmitArea();