Android Open Source - rhetolog Session Detail Activity






From Project

Back to project page rhetolog.

License

The source code is released under:

Copyright (c) 2012 Kirk Zurell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Soft...

If you think the Android project rhetolog 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 name.zurell.kirk.apps.android.rhetolog;
/*ww w. j  a va2  s  . c o m*/
/*
 * Copyright (c) 2012 Kirk Zurell
 *
 * See the file LICENSE for copying permission.
 */

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;

public class SessionDetailActivity extends Activity implements SessionDetailFragment.Callbacks {

  
  
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        
        // Set detail page.
        setContentView(R.layout.activity_session_detail);

        // Allow return to previous activity.
        getActionBar().setDisplayHomeAsUpEnabled(true);
        
        
        // Session ID as long
        long sessionId = getIntent().getExtras().getLong(SessionDetailFragment.ARG_ITEM_ID);
        
        // Set up fragment, using either cached current result or original arguments.
        SessionDetailFragment fragment = SessionDetailFragment.newInstance(sessionId);
        
       
      // No use for savedInstanceState right now,
      // each recreate from original arguments.

        
        getFragmentManager().beginTransaction()
          .add(R.id.session_detail_container, fragment)
          .commit();
        
    }

    
    
    



  @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
          return true;
        }

        return super.onOptionsItemSelected(item);
    }

    
  
  
  
  @Override
  public void onDeleteParticipantClicked(int participantToDelete) {
    
    Uri deleteParticipant = Uri.withAppendedPath(
        RhetologContract.PARTICIPANTS_URI, 
        Integer.toString(participantToDelete)
        );
    
    getContentResolver().delete(deleteParticipant, null, null);
    
  }
    
    
    


  
    
}




Java Source Code List

name.zurell.kirk.apps.android.rhetolog.DigitalSessionClock.java
name.zurell.kirk.apps.android.rhetolog.FallacyAdapter.java
name.zurell.kirk.apps.android.rhetolog.FallacyView.java
name.zurell.kirk.apps.android.rhetolog.Fallacy.java
name.zurell.kirk.apps.android.rhetolog.MRUAdapter.java
name.zurell.kirk.apps.android.rhetolog.MRUView.java
name.zurell.kirk.apps.android.rhetolog.MainActivity.java
name.zurell.kirk.apps.android.rhetolog.ParticipantAdapter.java
name.zurell.kirk.apps.android.rhetolog.ParticipantView.java
name.zurell.kirk.apps.android.rhetolog.PreferencesActivity.java
name.zurell.kirk.apps.android.rhetolog.PreferencesGeneralFragment.java
name.zurell.kirk.apps.android.rhetolog.RhetologApplication.java
name.zurell.kirk.apps.android.rhetolog.RhetologContentProvider.java
name.zurell.kirk.apps.android.rhetolog.RhetologContract.java
name.zurell.kirk.apps.android.rhetolog.SessionActor.java
name.zurell.kirk.apps.android.rhetolog.SessionDateTimeDialogFragment.java
name.zurell.kirk.apps.android.rhetolog.SessionDetailActivity.java
name.zurell.kirk.apps.android.rhetolog.SessionDetailFragment.java
name.zurell.kirk.apps.android.rhetolog.SessionListActivity.java
name.zurell.kirk.apps.android.rhetolog.SessionListFragment.java
name.zurell.kirk.apps.android.rhetolog.SimpleGraphView.java