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

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

Issue 29505609: Issue 5469 - Clipped text inside 'More blocking options' setting (Closed)
Patch Set: Created Aug. 4, 2017, 9:59 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 | mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/thirdparty/org/adblockplus/browser/MoreSubscriptionsPreferenceGroup.java
===================================================================
--- a/mobile/android/thirdparty/org/adblockplus/browser/MoreSubscriptionsPreferenceGroup.java
+++ b/mobile/android/thirdparty/org/adblockplus/browser/MoreSubscriptionsPreferenceGroup.java
@@ -18,16 +18,17 @@
package org.adblockplus.browser;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.concurrent.Semaphore;
import org.mozilla.gecko.R;
+import org.mozilla.gecko.preferences.CustomCheckBoxPreference;
import org.mozilla.gecko.util.NativeJSObject;
import org.mozilla.gecko.util.ThreadUtils;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Build;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
@@ -109,28 +110,28 @@ public class MoreSubscriptionsPreference
this.setLayoutResource(R.layout.abb_minimal_widget);
return super.onCreateView(parent);
}
public static Preference createCheckBoxOrSwitch(final Context context)
{
if (Build.VERSION.SDK_INT < 14)
{
- return new CheckBoxPreference(context);
+ return new CustomCheckBoxPreference(context);
}
try
{
return (Preference) Class.forName("android.preference.SwitchPreference")
.getConstructor(Context.class)
.newInstance(context);
}
catch (Exception e)
{
Log.e(TAG, "Failed to create SwitchPreference, falling back to CheckBoxPreference", e);
- return new CheckBoxPreference(context);
+ return new CustomCheckBoxPreference(context);
}
}
@Override
protected void onAttachedToActivity()
{
this.setEnabled(false);
this.setShouldDisableView(true);
@@ -165,32 +166,32 @@ public class MoreSubscriptionsPreference
}
private void initEntries()
{
this.removeAll();
int i = 0;
for (; i < BUILTIN_TITLES.length; i++)
{
- final CheckBoxPreference cbp = new CheckBoxPreference(this.getContext());
+ final CheckBoxPreference cbp = new CustomCheckBoxPreference(this.getContext());
final String url = BUILTIN_LISTS[i * 2 + 1];
cbp.setOrder(i);
cbp.setTitle(BUILTIN_TITLES[i]);
cbp.setKey(url);
cbp.setChecked(this.activeSubscriptions.enabledSubscriptions.containsKey(url));
cbp.setOnPreferenceChangeListener(this.checkBoxChangeListener);
cbp.setPersistent(false);
this.addPreference(cbp);
}
for (Entry<String, String> e : this.activeSubscriptions.enabledSubscriptions.entrySet())
{
if (!BUILTIN_URL_TO_INDEX.containsKey(e.getKey()))
{
- final CheckBoxPreference cbp = new CheckBoxPreference(this.getContext());
+ final CheckBoxPreference cbp = new CustomCheckBoxPreference(this.getContext());
cbp.setOrder(i++);
cbp.setTitle(e.getValue());
cbp.setKey(e.getKey());
cbp.setChecked(true);
cbp.setOnPreferenceChangeListener(this.checkBoxChangeListener);
cbp.setPersistent(false);
this.addPreference(cbp);
}
« no previous file with comments | « no previous file | mobile/android/thirdparty/org/adblockplus/browser/SubscriptionPreferenceCategory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld