Search in sources :

Example 1 with CategorySelectionFragment

use of com.google.samples.apps.topeka.fragment.CategorySelectionFragment in project android-topeka by googlesamples.

the class CategorySelectionActivity method attachCategoryGridFragment.

private void attachCategoryGridFragment() {
    FragmentManager supportFragmentManager = getSupportFragmentManager();
    Fragment fragment = supportFragmentManager.findFragmentById(R.id.category_container);
    if (!(fragment instanceof CategorySelectionFragment)) {
        fragment = CategorySelectionFragment.newInstance();
    }
    supportFragmentManager.beginTransaction().replace(R.id.category_container, fragment).commit();
    setProgressBarVisibility(View.GONE);
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) CategorySelectionFragment(com.google.samples.apps.topeka.fragment.CategorySelectionFragment) CategorySelectionFragment(com.google.samples.apps.topeka.fragment.CategorySelectionFragment) Fragment(android.support.v4.app.Fragment)

Aggregations

Fragment (android.support.v4.app.Fragment)1 FragmentManager (android.support.v4.app.FragmentManager)1 CategorySelectionFragment (com.google.samples.apps.topeka.fragment.CategorySelectionFragment)1