Commit 19d25cf1 authored by Mugdha Lakhani's avatar Mugdha Lakhani Committed by Commit Bot

[WebLayer Shell] Make URL TextView clickable again.

I had removed the clicklistener on the TextView for the demo app
here:
https://chromium-review.googlesource.com/c/chromium/src/+/2362817

since I was setting it on the parent view. Turns out, to make the child
TextView clicks go up to the parent, I'll need to mark it non-clickable in the
layout xml, which we don't want to do for production.

Adding the click listener explicitly on the TextView fixes this.

Change-Id: I7feaf35a436abb4ca4313f94b12e448c74f58562
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366900Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800109}
parent b116dee2
...@@ -382,6 +382,11 @@ public class WebLayerShellActivity extends FragmentActivity { ...@@ -382,6 +382,11 @@ public class WebLayerShellActivity extends FragmentActivity {
.setTextSizeSP(DEFAULT_TEXT_SIZE) .setTextSizeSP(DEFAULT_TEXT_SIZE)
.setTextColor(android.R.color.black) .setTextColor(android.R.color.black)
.setIconColor(android.R.color.black) .setIconColor(android.R.color.black)
.setTextClickListener(v -> {
mEditUrlView.setText("");
mUrlViewContainer.setDisplayedChild(EDITABLE_URL_TEXT_VIEW);
mEditUrlView.requestFocus();
})
.setTextLongClickListener(v -> { .setTextLongClickListener(v -> {
ClipboardManager clipboard = ClipboardManager clipboard =
(ClipboardManager) v.getContext().getSystemService( (ClipboardManager) v.getContext().getSystemService(
......
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