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

Commit ff92dd69 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am 7919bfb1: Merge "Don\'t show the submit button when it isn\'t enabled." into ics-mr1

* commit '7919bfb1':
  Don't show the submit button when it isn't enabled.
parents 48dd3880 7919bfb1
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();