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

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

Issue 29441558: Issue 5243 - Clipped text across languages (Closed)
Patch Set: Fixed layout name and bracket in preferences_main.xml Created May 31, 2017, 1:58 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
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 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 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 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/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.sbrowser.contentblocker; 18 package org.adblockplus.sbrowser.contentblocker;
19 19
20 import java.util.Collections; 20 import java.util.Collections;
21 import java.util.HashMap; 21 import java.util.HashMap;
22 import java.util.List; 22 import java.util.List;
23 import java.util.Locale; 23 import java.util.Locale;
24 24
25 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo; 25 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo;
26 import org.adblockplus.sbrowser.contentblocker.engine.Engine; 26 import org.adblockplus.sbrowser.contentblocker.engine.Engine;
27 import org.adblockplus.sbrowser.contentblocker.engine.EngineService; 27 import org.adblockplus.sbrowser.contentblocker.engine.EngineService;
28 import org.adblockplus.sbrowser.contentblocker.engine.SubscriptionInfo; 28 import org.adblockplus.sbrowser.contentblocker.engine.SubscriptionInfo;
29 import org.adblockplus.sbrowser.contentblocker.preferences.MultilinePreferenceCa tegory;
29 import org.adblockplus.adblockplussbrowser.R; 30 import org.adblockplus.adblockplussbrowser.R;
30 31
31 import android.annotation.SuppressLint; 32 import android.annotation.SuppressLint;
32 import android.content.Context; 33 import android.content.Context;
33 import android.preference.CheckBoxPreference; 34 import android.preference.CheckBoxPreference;
34 import android.preference.Preference; 35 import android.preference.Preference;
35 import android.preference.PreferenceCategory;
36 import android.preference.Preference.OnPreferenceChangeListener; 36 import android.preference.Preference.OnPreferenceChangeListener;
37 import android.text.format.DateUtils; 37 import android.text.format.DateUtils;
38 import android.util.AttributeSet; 38 import android.util.AttributeSet;
39 import android.view.View; 39 import android.view.View;
40 import android.view.ViewGroup; 40 import android.view.ViewGroup;
41 41
42 @SuppressLint("DefaultLocale") 42 @SuppressLint("DefaultLocale")
43 public class ListedSubscriptionsPreferenceCategory extends PreferenceCategory im plements 43 public class ListedSubscriptionsPreferenceCategory extends MultilinePreferenceCa tegory implements
44 EngineService.OnEngineCreatedCallback, OnPreferenceChangeListener 44 EngineService.OnEngineCreatedCallback, OnPreferenceChangeListener
45 { 45 {
46 private Engine engine = null; 46 private Engine engine = null;
47 private boolean isEnabledView = false; 47 private boolean isEnabledView = false;
48 48
49 private static final String[] LANGUAGE_TRANSLATIONS = 49 private static final String[] LANGUAGE_TRANSLATIONS =
50 { 50 {
51 "id", "Bahasa Indonesia", 51 "id", "Bahasa Indonesia",
52 "he", "עברית" 52 "he", "עברית"
53 }; 53 };
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 public boolean onPreferenceChange(final Preference preference, final Object ne wValue) 191 public boolean onPreferenceChange(final Preference preference, final Object ne wValue)
192 { 192 {
193 final String id = preference.getKey(); 193 final String id = preference.getKey();
194 final boolean enabled = ((Boolean) newValue).booleanValue(); 194 final boolean enabled = ((Boolean) newValue).booleanValue();
195 195
196 this.engine.changeSubscriptionState(id, enabled); 196 this.engine.changeSubscriptionState(id, enabled);
197 197
198 return true; 198 return true;
199 } 199 }
200 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld