Add version to about screen (fix #25)

Этот коммит содержится в:
Anton Tananaev
2013-04-05 00:07:41 +13:00
родитель b992ee0a8d
Коммит 89053e9801
2 изменённых файлов: 9 добавлений и 0 удалений
+8
Просмотреть файл
@@ -16,7 +16,9 @@
package org.traccar.client;
import android.app.Activity;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.widget.TextView;
public class AboutActivity extends Activity {
@@ -24,6 +26,12 @@ public class AboutActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.about);
TextView title = (TextView) findViewById(R.id.title);
try {
title.setText(title.getText() + " " + getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName);
} catch (NameNotFoundException e) {
}
}
}