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

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/preferences/ImprintPreference.java

Issue 29510587: Issue 5366 - Reach full legal compliance in ABP for Samsung Internet (Closed)
Patch Set: Issue 5366 - Reach full legal compliance in ABP for Samsung Internet Created Aug. 10, 2017, 7:09 a.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
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/preferences/ImprintPreference.java
===================================================================
new file mode 100644
--- /dev/null
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/preferences/ImprintPreference.java
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2017 Eyeo GmbH
anton 2017/08/11 11:20:38 please double check `E` - i believe it should be '
jens 2017/08/11 13:27:33 Acknowledged.
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.adblockplus.sbrowser.contentblocker.preferences;
+
+import org.adblockplus.adblockplussbrowser.R;
+
+import android.content.Context;
+import android.preference.Preference;
+import android.text.Html;
+import android.text.method.LinkMovementMethod;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.TextView;
+
+public class ImprintPreference extends Preference
+{
+ public ImprintPreference(Context context, AttributeSet attrs, int defStyleAttr)
+ {
+ super(context, attrs, defStyleAttr);
+ }
+
+ public ImprintPreference(Context context, AttributeSet attrs)
+ {
+ super(context, attrs);
+ setLayoutResource(R.layout.imprint_screen);
+ setSelectable(false);
+ }
+
+ public ImprintPreference(Context context)
+ {
+ super(context);
+ }
+
+ @Override
+ protected void onBindView(View view)
+ {
+ super.onBindView(view);
+ final TextView tvImprint = (TextView) view.findViewById(R.id.tv_imprint);
+ tvImprint.setText(Html.fromHtml(getContext().getString(R.string.imprint_text)));
+ tvImprint.setMovementMethod(LinkMovementMethod.getInstance());
+ }
+}

Powered by Google App Engine
This is Rietveld