Android Open Source - umpire_buddy About Activity






From Project

Back to project page umpire_buddy.

License

The source code is released under:

Apache License

If you think the Android project umpire_buddy 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 com.bluefairyapps.java.android.umpirebuddy;
/*from  w  w w .  j  a  v  a 2 s  . c  o  m*/
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

public class AboutActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    setupActionBar();
  }

  private void setupActionBar() {

    getActionBar().setDisplayHomeAsUpEnabled(true);
  }

  @Override
  protected void onStart() {
    super.onStart();
    
    registerForContextMenu(findViewById(R.id.copy_about));
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    
    switch (item.getItemId()) {
    
    case android.R.id.home:
      NavUtils.navigateUpFromSameTask(this);
      return true;
    }
    return super.onOptionsItemSelected(item);
  }

  @Override
  public void onCreateContextMenu(ContextMenu menu, View v,
      ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    
    switch(v.getId()) {
    
    case R.id.copy_about:
      getMenuInflater().inflate(R.menu.context_about, menu);
      break;
    default: break;
    }
  }

  @Override
  public boolean onContextItemSelected(MenuItem item) {
    
    switch(item.getItemId()) {
    
    case R.id.context_about_moreinfo:
      Toast.makeText(this, R.string.message_moreinfo, Toast.LENGTH_SHORT).show();
      return true;
    default: break;
    }
    
    return super.onContextItemSelected(item);
  }

  @Override
  protected void onStop() {
    super.onStop();
    
    unregisterForContextMenu(findViewById(R.id.copy_about));
  }

}




Java Source Code List

com.bluefairyapps.java.android.umpirebuddy.AboutActivity.java
com.bluefairyapps.java.android.umpirebuddy.MainActivity.java
com.bluefairyapps.java.android.umpirebuddy.enums.EventsEnum.java
com.bluefairyapps.java.android.umpirebuddy.enums.GameStatsEnum.java
com.bluefairyapps.java.android.umpirebuddy.event.EventListener.java
com.bluefairyapps.java.android.umpirebuddy.event.Event.java
com.bluefairyapps.java.android.umpirebuddy.event.game.GameStatUpdateEvent.java
com.bluefairyapps.java.android.umpirebuddy.systems.AudioSystem.java
com.bluefairyapps.java.android.umpirebuddy.systems.BaseballGameSystem.java
com.bluefairyapps.java.android.umpirebuddy.systems.EventManager.java
com.bluefairyapps.java.android.umpirebuddy.utils.BaseballRules.java
com.bluefairyapps.java.android.umpirebuddy.utils.GameStats.java