Back to project page chemistry-data.
The source code is released under:
MIT License
If you think the Android project chemistry-data listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.sparkfiregames.chemdata; /*w ww . j a v a 2 s .c o m*/ import android.app.Activity; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; /** * @author Allen Guo */ public class AboutActivity extends Activity { private Button back; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.about); String version = getVersion(); if (version != null) { setTitle("About Chemistry Data " + version); } back = (Button) findViewById(R.id.back_button); back.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { finish(); } }); } public String getVersion() { try { return getPackageManager().getPackageInfo(getPackageName(), 0).versionName; } catch (NameNotFoundException e) { e.printStackTrace(); return ""; } } }