Update the text and make clickable hypertext.

This commit is contained in:
Kevin Ruland 2012-02-29 17:55:35 +00:00
parent 82b28e7a75
commit 84e3156cb9

View File

@ -1,11 +1,11 @@
package net.sf.openrocket.android;
import net.sf.openrocket.android.rocket.OpenRocketLoaderActivity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;
public class AboutDialogFragment extends DialogFragment {
@ -15,22 +15,32 @@ public class AboutDialogFragment extends DialogFragment {
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
public AlertDialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// .setIcon(android.R.drawable.alert_dialog_icon)
builder.setTitle("About");
builder.setTitle("About OpenRocket");
StringBuilder sb = new StringBuilder();
sb.append("OpenRocket\n");
sb.append("Copyright 2007-2012 Sampo Niskanen\n");
sb.append("\n");
sb.append("The android port contains third party software:\n");
sb.append(" AChartEngine - Apache License 2.0\n");
sb.append(" Android Open Source Project - Apache License 2.0\n");
sb.append(" Android tree-view-list - 2-clause BSD licensed\n");
builder.setMessage(sb.toString());
sb.append("<p>Copyright 2007-2012 Sampo Niskanen and others</p>");
sb.append("<p>Android port by Kevin Ruland</p>");
sb.append("<p/>");
sb.append("<p>Licensed under GPLv3 or later. ");
sb.append("Full source available on <a href=\"http://openrocket.sourceforge.net/\">SourceForge</a></p>");
sb.append("<p>The android port contains third party software:</p>");
sb.append("<nbsp/><p>AChartEngine - Apache License 2.0</p>");
sb.append("<nbsp/><p>Android Open Source Project - Apache License 2.0</p>");
sb.append("<nbsp/><p>Android tree-view-list - 2-clause BSD licensed</p>");
String s = sb.toString();
builder.setMessage(Html.fromHtml(s));
builder.setCancelable(true);
return builder.create();
}
@Override
public void onStart() {
super.onStart();
((TextView) this.getDialog().findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
}
}