123456789101112131415161718192021222324252627282930313233 |
- package de.tudarmstadt.informatik.hostage.ui;
- import de.tudarmstadt.informatik.hostage.R;
- import android.app.Activity;
- import android.content.pm.PackageInfo;
- import android.content.pm.PackageManager.NameNotFoundException;
- import android.os.Bundle;
- import android.widget.TextView;
- /**
- * 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) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
|