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

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

Issue 29341314: Issue 2512 - A square to mark and unmark is displayed on the side of "None". (Closed)
Patch Set: Created May 12, 2016, 12:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java
===================================================================
--- a/mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java
+++ b/mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java
@@ -92,25 +92,25 @@ public class SubscriptionPreferenceCateg
{
SubscriptionPreferenceCategory.this.initEntries();
}
});
}
});
}
- private CheckBoxPreference createDisabledCheckBox(final int titleId, final int summaryId)
+ private Preference createDisabledPreference(final int titleId, final int summaryId)
{
- final CheckBoxPreference cbp = new CheckBoxPreference(this.getContext());
- cbp.setTitle(titleId);
- cbp.setSummary(summaryId);
- cbp.setEnabled(false);
- cbp.setShouldDisableView(true);
- cbp.setSelectable(false);
- return cbp;
+ final Preference preference = new Preference(this.getContext());
+ preference.setTitle(titleId);
+ preference.setSummary(summaryId);
+ preference.setEnabled(false);
+ preference.setShouldDisableView(true);
+ preference.setSelectable(false);
+ return preference;
}
private CheckBoxPreference createEnabledCheckBox(
final SubscriptionContainer.Subscription subscription)
{
final CheckBoxPreference cbp = new CheckBoxPreference(this.getContext());
cbp.setTitle(subscription.specialization);
cbp.setSummary(subscription.title);
@@ -144,17 +144,17 @@ public class SubscriptionPreferenceCateg
private void initEntries(final int titleId, final int summaryId, boolean enabled)
{
this.removeAll();
final List<SubscriptionContainer.Subscription> entries =
subscriptionContainer.getSubscriptions(enabled);
if (entries.isEmpty())
{
- this.addPreference(this.createDisabledCheckBox(titleId, summaryId));
+ this.addPreference(this.createDisabledPreference(titleId, summaryId));
}
else
{
for (SubscriptionContainer.Subscription e : entries)
{
this.addPreference(this.createEnabledCheckBox(e));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld