Permalink
Browse files

about page

  • Loading branch information...
1 parent 6ce04bf commit 1948c08154a6ba96c70fa0e2da500d1d6d81c75e @Xlythe committed Feb 11, 2013
View
@@ -27,6 +27,7 @@
</intent-filter>
</activity>
<activity android:name=".Preferences" android:label="@string/settings" />
+ <activity android:name=".About" android:label="@string/activity_about" />
<receiver android:name=".CalculatorWidget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
View
@@ -0,0 +1,12 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/about"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:autoLink="web|email"
+ android:padding="20dp" />
+
+</LinearLayout>
View
@@ -200,4 +200,6 @@
<string name="easter_egg">Magikarp used Splash but nothing happened.</string>
-</resources>
+ <string name="activity_about">About</string>
+ <string name="about">Maintainer: Will Harmon (Xlythe)\nUniversity: University of Waterloo\nContact Details: xlythe@gmail.com\nVersion Number: %s\nCountry: Canada\nLast Updated: Feb 11, 2013\nSource Code: https://github.com/Xlythe/android_packages_apps_Calculator\nOther Apps: https://play.google.com/store/apps/developer?id=Xlythe</string>
+</resources>
@@ -0,0 +1,27 @@
+package com.android2.calculator3;
+
+import android.app.Activity;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Bundle;
+import android.text.method.LinkMovementMethod;
+import android.widget.TextView;
+
+/**
+ * @author Will Harmon
+ **/
+public class About extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.about);
+ try {
+ String aboutDesc = String.format(getString(R.string.about), getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
+ TextView about = (TextView) findViewById(R.id.about);
+ about.setText(aboutDesc);
+ about.setMovementMethod(LinkMovementMethod.getInstance());
+ }
+ catch(NameNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+}
@@ -5,6 +5,8 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
import android.widget.TextView;
/**
@@ -19,6 +21,12 @@ protected void onCreate(Bundle savedInstanceState) {
String versionName = "v" + getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
TextView version = (TextView) findViewById(R.id.version);
version.setText(versionName);
+ version.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(new Intent(Preferences.this, About.class));
+ }
+ });
}
catch(NameNotFoundException e) {
e.printStackTrace();

0 comments on commit 1948c08

Please sign in to comment.