Commit 2f59099e authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Ui framework should only consume space when used.

Bug: b/152013302
Change-Id: I3bfc9628c01c130e49630bfddf08898ce9b68838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111319
Auto-Submit: Clemens Arbesser <arbesser@google.com>
Commit-Queue: Sandro Maggi <sandromaggi@google.com>
Reviewed-by: default avatarSandro Maggi <sandromaggi@google.com>
Cr-Commit-Position: refs/heads/master@{#752398}
parent c6f50281
......@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.autofill_assistant.generic_ui;
import android.view.View;
import android.view.ViewGroup;
import org.chromium.ui.modelutil.PropertyKey;
......@@ -31,6 +32,9 @@ class AssistantGenericUiViewBinder
view.mViewContainer.removeAllViews();
if (model.get(AssistantGenericUiModel.VIEW) != null) {
view.mViewContainer.addView(model.get(AssistantGenericUiModel.VIEW));
view.mViewContainer.setVisibility(View.VISIBLE);
} else {
view.mViewContainer.setVisibility(View.GONE);
}
} else {
assert false : "Unhandled property detected in AssistantGenericUiViewBinder!";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment