Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/preferences/MultilineListPreference.java

Issue 29441558: Issue 5243 - Clipped text across languages (Closed)
Patch Set: Created May 18, 2017, 12:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package org.adblockplus.sbrowser.contentblocker.preferences;
diegocarloslima 2017/05/25 18:53:56 Our Copyright header is missing here
jens 2017/05/30 12:17:00 Acknowledged.
2
3 import android.content.Context;
4 import android.preference.ListPreference;
5 import android.util.AttributeSet;
6 import android.view.View;
7 import android.widget.TextView;
8
9 /**
10 * Represents a List in a preference menu.
11 * The title of the list items can be larger than the view.
12 * In this case, it will be displayed in 2 or more lines.
13 * The default behavior of the class ListPreference
14 * doesn't wrap the title.
15 */
16
17 public class MultilineListPreference extends ListPreference
18 {
19 public MultilineListPreference(Context context) {
20 super(context);
21 }
22
23 public MultilineListPreference(Context context, AttributeSet attrs) {
24 super(context, attrs);
25 }
26
27 public MultilineListPreference(Context context, AttributeSet attrs, int defSty le) {
28 super(context, attrs, defStyle);
29 }
30
31 @Override
32 protected void onBindView(View view) {
33 super.onBindView(view);
34 final TextView title = (TextView) view.findViewById(android.R.id.title);
35 if (title != null) {
36 title.setSingleLine(false);
37 title.setEllipsize(null);
38 }
39 }
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld