Code example for FragmentActivity

Methods: startActivity

0
        else { 
            // use separate activity 
            Intent i = new Intent(this, ArticleActivity.class);
            i.putExtra("catIndex", mCatIndex);
            i.putExtra("artIndex", index);
            startActivity(i);
        } 
    } 
 
    /** 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. 
     */ 
    @Override 
    public void onCategorySelected(int catIndex) {
        setNewsCategory(catIndex);
    }