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: Fixed copyright text and xml formatting Created Aug. 11, 2017, 1:29 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 | « adblockplussbrowser/res/xml/preferences_main.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+ *
+ * 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());
+ }
+}
« no previous file with comments | « adblockplussbrowser/res/xml/preferences_main.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld