Code example for FragmentActivity

Methods: startActivity

        else { 
            // use separate activity 
            Intent i = new Intent(this, ArticleActivity.class);
            i.putExtra("catIndex", mCatIndex);
            i.putExtra("artIndex", index);
    /** Called when a news category is selected. 
     * This is called by our CompatActionBarNavHandler in response to the user selecting a 
     * news category in the Action Bar. We react by loading and displaying the headlines for 
     * that category. 
     * @param catIndex the index of the selected news category. 
    public void onCategorySelected(int catIndex) {