Back to project page android-3.0-howtos.
The source code is released under:
Copyright 2012-present Facebook, Inc. You are hereby granted a non-exclusive, worldwide, royalty-free license to use, copy, modify, and distribute this software in source code or binary form for use ...
If you think the Android project android-3.0-howtos listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.facebook.samples.applinkinghowto; //www. j a va 2 s. c om import android.os.Bundle; import android.support.v4.app.FragmentActivity; public class DetailActivity extends FragmentActivity { private DetailFragment detailFragment; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create the fragment on the initial setup if (savedInstanceState == null) { // Set up the details fragment detailFragment = new DetailFragment(); detailFragment.setArguments(getIntent().getExtras()); getSupportFragmentManager() .beginTransaction() .add(android.R.id.content, detailFragment) .commit(); } else { detailFragment = (DetailFragment) getSupportFragmentManager() .findFragmentById(android.R.id.content); } } }