Android Open Source - SOIAF_RPG Currency Activity






From Project

Back to project page SOIAF_RPG.

License

The source code is released under:

GNU General Public License

If you think the Android project SOIAF_RPG 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 de.mroehrl.soiaf_rpg;
//w w  w  .  java 2 s  . c  om
import android.content.Intent;
import android.os.Bundle;
import android.app.Activity;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;



/**
 * An activity representing a single Item detail screen. This
 * activity is only used on handset devices. On tablet-size devices,
 * item details are presented side-by-side with a list of items
 * in a {@link ItemListActivity}.
 * <p>
 * This activity is mostly just a 'shell' activity containing nothing
 * more than a {@link CurrencyFragment}.
 */
public class CurrencyActivity extends Activity {


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

        // Show the Up button in the action bar.
        getActionBar().setDisplayHomeAsUpEnabled(true);

        if (savedInstanceState == null) {
            Bundle arguments = new Bundle();
            arguments.putString(CurrencyFragment.ARG_ITEM_ID,  getIntent().getStringExtra(CurrencyFragment.ARG_ITEM_ID));
            CurrencyFragment fragment = new CurrencyFragment();
            fragment.setArguments(arguments);
            getFragmentManager().beginTransaction()
                    .add(R.id.item_detail_container, fragment)
                    .commit();
        }      
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch(item.getItemId()) {
          case android.R.id.home:
            NavUtils.navigateUpTo(this, new Intent(this, ItemListActivity.class));
              return true;
        }
        
        return super.onOptionsItemSelected(item);
    }
}




Java Source Code List

de.mroehrl.RPG.RPGCharacter.java
de.mroehrl.RPG.SqlOpenHelper.java
de.mroehrl.soiaf_rpg.CharacterActivity.java
de.mroehrl.soiaf_rpg.CharacterFragment.java
de.mroehrl.soiaf_rpg.CurrencyActivity.java
de.mroehrl.soiaf_rpg.CurrencyFragment.java
de.mroehrl.soiaf_rpg.ItemListActivity.java
de.mroehrl.soiaf_rpg.ItemListFragment.java
de.mroehrl.soiaf_rpg.content.SOIAFContent.java