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

Unified Diff: src/org/adblockplus/android/AboutDialog.java

Issue 6731909971312640: Issue 1227 - Could not close the info-text (Closed)
Patch Set: Created Nov. 6, 2014, 12:49 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 | « res/layout/about.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/AboutDialog.java
diff --git a/src/org/adblockplus/android/AboutDialog.java b/src/org/adblockplus/android/AboutDialog.java
index 1dbadeeb3c13f080cd7920ea63b093d3b4886c1e..b074cafef9e0563a9d0101f34aeedd30233287a8 100644
--- a/src/org/adblockplus/android/AboutDialog.java
+++ b/src/org/adblockplus/android/AboutDialog.java
@@ -24,10 +24,13 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
+import android.view.View;
+import android.view.View.OnClickListener;
import android.view.Window;
+import android.widget.Button;
import android.widget.TextView;
-public class AboutDialog extends Dialog
+public class AboutDialog extends Dialog implements OnClickListener
{
private static Context context = null;
@@ -78,5 +81,14 @@ public class AboutDialog extends Dialog
final TextView tv = (TextView) findViewById(R.id.about_text);
tv.setText(Html.fromHtml(info.toString()));
tv.setMovementMethod(LinkMovementMethod.getInstance());
+
+ final Button okButton = (Button) findViewById(R.id.close_about);
+ okButton.setOnClickListener(this);
Felix Dahlke 2014/11/11 09:30:43 Not a particular fan of this pattern, gets messy p
+ }
+
+ @Override
+ public void onClick(View v)
+ {
+ this.dismiss();
}
}
« no previous file with comments | « res/layout/about.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld