Android Open Source - Race2GED The Ged Activity

From Project

Back to project page Race2GED.


The source code is released under:

GNU General Public License

If you think the Android project Race2GED 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 edu.mecc.race2ged;
//from  w  w  w  .  ja  va 2 s .c  o  m
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class TheGedActivity extends Activity {
     * Called when the activity is first created.
    public void onCreate(Bundle savedInstanceState) {

        ListView list = (ListView) findViewById(;

        String[] mTestArray = (String[]) getResources().getStringArray(R.array.theged_items);
        ArrayAdapter<String> aa = new ArrayAdapter<String>(getApplicationContext(),
                R.layout.listview_layouts, mTestArray);

        list.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,
                                    int position, long id) {
                if (position == 0) {
                    Intent nIntent = new Intent(view.getContext(), WhatGedActivity.class);
                    startActivityForResult(nIntent, 0);

                if (position == 1) {
                    Intent nIntent = new Intent(view.getContext(), HowGedActivity.class);
                    startActivityForResult(nIntent, 0);

                if (position == 2) {
                    Intent nIntent = new Intent(view.getContext(), NewGedActivity.class);
                    startActivityForResult(nIntent, 0);

    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(, menu);

        return true;

    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {

        return true;

Java Source Code List