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

Side by Side Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/preferences/MultilinePreferenceCategory.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.PreferenceCategory;
5 import android.util.AttributeSet;
6 import android.view.View;
7 import android.widget.TextView;
8
9 /**
10 * Represents a category item in a preference menu.
11 * The title of the category 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 PreferenceCategory
14 * doesn't wrap the title.
15 */
16
17 public class MultilinePreferenceCategory extends PreferenceCategory
18 {
19 public MultilinePreferenceCategory(Context context)
20 {
21 super(context);
22 }
23
24 public MultilinePreferenceCategory(Context context, AttributeSet attrs)
25 {
26 super(context, attrs);
27 }
28
29 public MultilinePreferenceCategory(Context context, AttributeSet attrs, int de fStyleAttr)
30 {
31 super(context, attrs, defStyleAttr);
32 }
33
34 @Override
35 protected void onBindView(View view)
36 {
37 super.onBindView(view);
38 final TextView title = (TextView) view.findViewById(android.R.id.title);
39 if (title != null) {
40 title.setSingleLine(false);
41 title.setEllipsize(null);
42 }
43 }
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld