Android Open Source - Android102 Person Detail Activity






From Project

Back to project page Android102.

License

The source code is released under:

MIT License

If you think the Android project Android102 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.myfamily;
//from ww w.j a  va  2s  . co  m
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;

public class PersonDetailActivity extends FragmentActivity {

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

        getActionBar().setDisplayHomeAsUpEnabled(true);

        if (savedInstanceState == null) {
            Bundle arguments = new Bundle();
            arguments.putString(PersonDetailFragment.ARG_ITEM_ID,
                    getIntent().getStringExtra(PersonDetailFragment.ARG_ITEM_ID));
            PersonDetailFragment fragment = new PersonDetailFragment();
            fragment.setArguments(arguments);
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.person_detail_container, fragment)
                    .commit();
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            NavUtils.navigateUpTo(this, new Intent(this, PersonListActivity.class));
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}




Java Source Code List

asia.sonix.android.orm.AbatisService.java
com.myfamily.PersonDetailActivity.java
com.myfamily.PersonDetailFragment.java
com.myfamily.PersonListActivity.java
com.myfamily.PersonListFragment.java
com.myfamily.db.FamilyDb.java
com.myfamily.db.FamilyMember.java
com.myfamily.dummy.DummyContent.java
com.myfamily.receivers.SmsReceiver.java
com.myfamily.services.LocationService.java