Commit f5743438 authored by Bernhard Bauer's avatar Bernhard Bauer Committed by Commit Bot
parent d541310f
......@@ -658,6 +658,11 @@ public class UrlBar extends AutocompleteEditText {
return super.onTextContextMenuItem(id);
}
@Override
protected boolean getDefaultEditable() {
return false;
}
/**
* Sets the text content of the URL bar.
*
......@@ -982,6 +987,14 @@ public class UrlBar extends AutocompleteEditText {
mUrlBarDelegate.onTextChangedForAutocomplete();
}
/**
* Set whether the URL text should be ellipsized. Note that this is different from
* {@link #limitDisplayableLength} in that it limits the visible part of the text.
*/
public void setShouldEllipsizeUrlText(boolean shouldEllipsize) {
setEllipsize(shouldEllipsize ? TextUtils.TruncateAt.END : null);
}
/**
* Span that displays ellipsis instead of the text. Used to hide portion of
* very large string to get decent performance from TextView.
......
......@@ -441,6 +441,8 @@ public class CustomTabToolbar extends ToolbarLayout implements LocationBar,
if (mUrlBar.setUrl(url, displayText)) {
mUrlBar.emphasizeUrl();
}
mUrlBar.setShouldEllipsizeUrlText(publisherUrl != null);
}
private boolean isStoredArticle(String url) {
......
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