Android Open Source - SensOSC About Activity






From Project

Back to project page SensOSC.

License

The source code is released under:

Author: Thomas Mayer <thomas@residuum.org> Copyright (c) 2014 Thomas Mayer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...

If you think the Android project SensOSC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.residuum.sensosc;
/*from   ww w  . j  av  a2s.com*/
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.MenuItem;
import android.widget.TextView;

/**
 * Created by thomas on 07.10.14.
 */
public class AboutActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    String versionString = getResources().getString(R.string.app_name);
    try {
      versionString += " " + getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
    } catch (PackageManager.NameNotFoundException e) {
      e.printStackTrace();
    }
    TextView nameAndVersion = (TextView) findViewById(R.id.name_and_version);
    nameAndVersion.setText(versionString);
    TextView javaOsc = (TextView) findViewById(R.id.javaosc_links);
    javaOsc.setMovementMethod(LinkMovementMethod.getInstance());
    javaOsc.setText(Html.fromHtml(getResources().getString(R.string.about_license_javaosc)));
    TextView buglinks = (TextView) findViewById(R.id.buglinks);
    buglinks.setMovementMethod(LinkMovementMethod.getInstance());
    buglinks.setText(Html.fromHtml(getResources().getString(R.string.about_buglinks)));
    getActionBar().setDisplayHomeAsUpEnabled(true);
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      // Respond to the action bar's Up/Home button
      case android.R.id.home:
        NavUtils.navigateUpFromSameTask(this);
        return true;
    }
    return super.onOptionsItemSelected(item);
  }
}




Java Source Code List

org.residuum.sensosc.AboutActivity.java
org.residuum.sensosc.ApplicationTest.java
org.residuum.sensosc.ExtendedEditTextPreference.java
org.residuum.sensosc.OscCommunication.java
org.residuum.sensosc.OscConfiguration.java
org.residuum.sensosc.SensorFragment.java
org.residuum.sensosc.SensorGroupFragment.java
org.residuum.sensosc.Sensor.java
org.residuum.sensosc.SettingsActivity.java
org.residuum.sensosc.StartupActivity.java