Android Open Source - android-final-exam-stuff Student Details Activity






From Project

Back to project page android-final-exam-stuff.

License

The source code is released under:

Apache License

If you think the Android project android-final-exam-stuff 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 tr.edu.iyte.ceng389.finalexamstuff;
/* ww w  . java  2  s.co  m*/
import android.app.Activity;
import android.app.FragmentTransaction;
import android.os.Bundle;

public class StudentDetailsActivity extends Activity
{
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_details);
    
    Bundle extras = getIntent().getExtras();
    if(extras != null && extras.containsKey(StudentProvider.COLUMN_ID))
    {
      long id = extras.getLong(StudentProvider.COLUMN_ID);
      
      Bundle args = new Bundle();
      args.putLong(StudentProvider.COLUMN_ID, id);
      StudentDetailsFragment detailsFragment = (StudentDetailsFragment) StudentDetailsFragment.instantiate(getApplicationContext(), StudentDetailsFragment.class.getName(), args);
      
      FragmentTransaction transaction = getFragmentManager().beginTransaction();
      transaction.replace(R.id.frameLayout_studentDetails, detailsFragment);
      transaction.commit();
    }
  }
}




Java Source Code List

tr.edu.iyte.ceng389.finalexamstuff.AddStudentActivity.java
tr.edu.iyte.ceng389.finalexamstuff.MainActivity.java
tr.edu.iyte.ceng389.finalexamstuff.StudentAdapter.java
tr.edu.iyte.ceng389.finalexamstuff.StudentDetailsActivity.java
tr.edu.iyte.ceng389.finalexamstuff.StudentDetailsFragment.java
tr.edu.iyte.ceng389.finalexamstuff.StudentListFragment.java
tr.edu.iyte.ceng389.finalexamstuff.StudentProvider.java
tr.edu.iyte.ceng389.finalexamstuff.Student.java