EditText ET1 = (EditText) findViewById(R.id.editText1);
PackageInfo pinfo;
try {
pinfo = getPackageManager().getPackageInfo(getPackageName(), 0);
String versionName = pinfo.versionName;
ET1.setText(versionName);
//ET2.setText(versionNumber);
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}