1234567891011121314151617181920212223242526272829303132333435 |
- package de.tudarmstadt.informatik.hostage.ui;
- import android.app.Activity;
- import android.content.pm.PackageInfo;
- import android.content.pm.PackageManager.NameNotFoundException;
- import android.os.Bundle;
- import android.widget.TextView;
- import de.tudarmstadt.informatik.hostage.R;
- /**
- * Shows a simple About View with application version, a small discription and
- * authors of the project.
- *
- * @author Lars Pandikow
- *
- */
- public class AboutActivity extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_about);
- // Set Version Number
- PackageInfo pInfo;
- try {
- pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
- String version = pInfo.versionName;
- TextView versionTextView = (TextView) findViewById(R.id.version);
- versionTextView.setText(version);
- } catch (NameNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
|