Code example for FragmentActivity

0
package com.lunatech.example.sietse.StackSearch; 
 
import android.content.Intent; 
import android.os.Build; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.util.Log; 
import android.view.MenuItem; 
 
public class UserActivity extends FragmentActivity implements UserListFragment.Callbacks { 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        setContentView(R.layout.user_list); 
 
        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            getActionBar().setDisplayHomeAsUpEnabled(true); 
        } 
    } 
 
    public void onUserSelected(long rowid) {
       final UserDetailFragment detailFragment = getDetailFragment();
 
       if (detailFragment != null && detailFragment.isResumed())