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

Side by Side Diff: mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java

Issue 29505609: Issue 5469 - Clipped text inside 'More blocking options' setting (Closed)
Patch Set: Created Aug. 4, 2017, 9:59 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
« no previous file with comments | « mobile/android/thirdparty/org/adblockplus/browser/MoreSubscriptionsPreferenceGroup.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.browser; 18 package org.adblockplus.browser;
19 19
20 import java.util.List; 20 import java.util.List;
21 21
22 import org.mozilla.gecko.R; 22 import org.mozilla.gecko.R;
23 import org.mozilla.gecko.preferences.CustomCheckBoxPreference;
23 import org.mozilla.gecko.util.ThreadUtils; 24 import org.mozilla.gecko.util.ThreadUtils;
24 25
25 import android.app.ProgressDialog; 26 import android.app.ProgressDialog;
26 import android.content.Context; 27 import android.content.Context;
27 import android.preference.CheckBoxPreference; 28 import android.preference.CheckBoxPreference;
28 import android.preference.Preference; 29 import android.preference.Preference;
29 import android.preference.PreferenceCategory; 30 import android.preference.PreferenceCategory;
30 import android.util.AttributeSet; 31 import android.util.AttributeSet;
31 32
32 public class SubscriptionPreferenceCategory extends PreferenceCategory 33 public class SubscriptionPreferenceCategory extends PreferenceCategory
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 preference.setSummary(summaryId); 105 preference.setSummary(summaryId);
105 preference.setEnabled(false); 106 preference.setEnabled(false);
106 preference.setShouldDisableView(true); 107 preference.setShouldDisableView(true);
107 preference.setSelectable(false); 108 preference.setSelectable(false);
108 return preference; 109 return preference;
109 } 110 }
110 111
111 private CheckBoxPreference createEnabledCheckBox( 112 private CheckBoxPreference createEnabledCheckBox(
112 final SubscriptionContainer.Subscription subscription) 113 final SubscriptionContainer.Subscription subscription)
113 { 114 {
114 final CheckBoxPreference cbp = new CheckBoxPreference(this.getContext()); 115 final CheckBoxPreference cbp = new CustomCheckBoxPreference(this.getContext( ));
115 cbp.setTitle(subscription.specialization); 116 cbp.setTitle(subscription.specialization);
116 cbp.setSummary(subscription.title); 117 cbp.setSummary(subscription.title);
117 cbp.setChecked(true); 118 cbp.setChecked(true);
118 cbp.setKey(subscription.url); 119 cbp.setKey(subscription.url);
119 cbp.setPersistent(false); 120 cbp.setPersistent(false);
120 cbp.setChecked(subscriptionContainer.isSubscriptionListed(subscription.url)) ; 121 cbp.setChecked(subscriptionContainer.isSubscriptionListed(subscription.url)) ;
121 cbp.setOnPreferenceChangeListener(this.checkBoxChangeListener); 122 cbp.setOnPreferenceChangeListener(this.checkBoxChangeListener);
122 return cbp; 123 return cbp;
123 } 124 }
124 125
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 private class SubscriptionChangeListener implements SubscriptionContainer.Subs criptionListener 200 private class SubscriptionChangeListener implements SubscriptionContainer.Subs criptionListener
200 { 201 {
201 @Override 202 @Override
202 public void onSubscriptionUpdated() 203 public void onSubscriptionUpdated()
203 { 204 {
204 SubscriptionPreferenceCategory.this.refreshEntries(); 205 SubscriptionPreferenceCategory.this.refreshEntries();
205 } 206 }
206 } 207 }
207 } 208 }
208 209
OLDNEW
« no previous file with comments | « mobile/android/thirdparty/org/adblockplus/browser/MoreSubscriptionsPreferenceGroup.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld