| Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java |
| =================================================================== |
| --- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java |
| +++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java |
| @@ -26,16 +26,17 @@ |
| import android.support.annotation.DrawableRes; |
| import android.support.v4.content.ContextCompat; |
| import android.text.Editable; |
| import android.text.InputType; |
| import android.text.TextWatcher; |
| import android.util.AttributeSet; |
| import android.util.Patterns; |
| import android.view.KeyEvent; |
| +import android.view.View; |
| import android.view.inputmethod.EditorInfo; |
| import android.widget.EditText; |
| import android.widget.TextView; |
| import android.widget.Toast; |
| import org.adblockplus.adblockplussbrowser.R; |
| public class UrlInputOpenerPreference extends EditTextPreference implements TextWatcher, |
| @@ -117,16 +118,27 @@ |
| { |
| Toast.makeText(getContext(), R.string.whitelist_website_invalid_url_error, Toast.LENGTH_SHORT).show(); |
| } |
| return true; |
| } |
| return false; |
| } |
| + @Override |
| + protected void onBindView(View view) |
| + { |
| + super.onBindView(view); |
| + final TextView title = (TextView) view.findViewById(android.R.id.title); |
| + if (title != null) { |
| + title.setSingleLine(false); |
| + title.setEllipsize(null); |
| + } |
|
diegocarloslima
2017/05/25 18:53:56
To avoid duplication of this snippet here and in a
jens
2017/05/30 12:17:00
Acknowledged.
|
| + } |
| + |
| public void setIcon(@DrawableRes int iconResId) |
| { |
| final Drawable drawable = ContextCompat.getDrawable(getContext(), iconResId); |
| setIcon(drawable); |
| } |
| public void setIcon(Drawable icon) |
| { |