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: Added copyright header, extracted static method to set multiline property in onBindView(), added multi line property for subscriptions screen Created May 30, 2017, 12:25 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 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH
4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 package org.adblockplus.sbrowser.contentblocker.preferences;
19
20 import org.adblockplus.sbrowser.contentblocker.util.PreferenceUtils;
21
22 import android.content.Context;
23 import android.preference.ListPreference;
24 import android.util.AttributeSet;
25 import android.view.View;
26
27 /**
28 * Represents a List in a preference menu.
29 * The title of the list items can be larger than the view.
30 * In this case, it will be displayed in 2 or more lines.
31 * The default behavior of the class ListPreference
32 * doesn't wrap the title.
33 */
34
35 public class MultilineListPreference extends ListPreference
36 {
37 public MultilineListPreference(Context context) {
38 super(context);
39 }
40
41 public MultilineListPreference(Context context, AttributeSet attrs) {
42 super(context, attrs);
43 }
44
45 public MultilineListPreference(Context context, AttributeSet attrs, int defSty le) {
46 super(context, attrs, defStyle);
47 }
48
49 @Override
50 protected void onBindView(View view) {
51 super.onBindView(view);
52 PreferenceUtils.setMultilineTitle(view);
53 }
54 }
OLDNEW

Powered by Google App Engine
This is Rietveld