aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2014-11-04 12:08:30 -0500
committerSam Whited <sam@samwhited.com>2014-11-04 12:48:46 -0500
commitf10dd428bab50a05883a9f7f3d65db085e2e5359 (patch)
treef6e0c4c56d77732bcbe455fe9d2de9c961075dfa /src/main/java
parent97b4b012d0128232f16988d7b8742ac5c50d3e48 (diff)
Convert about dialog to activity
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/AboutActivity.java15
-rw-r--r--src/main/java/eu/siacs/conversations/ui/AboutPreference.java (renamed from src/main/java/eu/siacs/conversations/ui/AboutDialog.java)20
2 files changed, 29 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/AboutActivity.java b/src/main/java/eu/siacs/conversations/ui/AboutActivity.java
new file mode 100644
index 00000000..a61b872a
--- /dev/null
+++ b/src/main/java/eu/siacs/conversations/ui/AboutActivity.java
@@ -0,0 +1,15 @@
+package eu.siacs.conversations.ui;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+import eu.siacs.conversations.R;
+
+public class AboutActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_about);
+ }
+}
diff --git a/src/main/java/eu/siacs/conversations/ui/AboutDialog.java b/src/main/java/eu/siacs/conversations/ui/AboutPreference.java
index 994d1bd9..804b4e23 100644
--- a/src/main/java/eu/siacs/conversations/ui/AboutDialog.java
+++ b/src/main/java/eu/siacs/conversations/ui/AboutPreference.java
@@ -1,23 +1,31 @@
package eu.siacs.conversations.ui;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.PackageManager;
-import android.preference.DialogPreference;
+import android.preference.Preference;
import android.util.AttributeSet;
-public class AboutDialog extends DialogPreference {
- public AboutDialog(final Context context, final AttributeSet attrs, final int defStyle) {
+public class AboutPreference extends Preference {
+ public AboutPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
setSummary();
}
- public AboutDialog(final Context context, final AttributeSet attrs) {
+ public AboutPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
setSummary();
}
- private void setSummary() {
- if (getContext() != null &&getContext().getPackageManager() != null) {
+ @Override
+ protected void onClick() {
+ super.onClick();
+ final Intent intent = new Intent(getContext(), AboutActivity.class);
+ getContext().startActivity(intent);
+ }
+
+ private void setSummary() {
+ if (getContext() != null && getContext().getPackageManager() != null) {
final String packageName = getContext().getPackageName();
final String versionName;
try {