Search in sources :

Example 1 with SherlockFragment

use of com.actionbarsherlock.app.SherlockFragment in project Navigation-drawer-page-sliding-tab-strip by balaji-k13.

the class MainActivity method selectItem.

private void selectItem(int position) {
    switch(position) {
        case 0:
            getSupportFragmentManager().beginTransaction().add(R.id.content, PageSlidingTabStripFragment.newInstance(), PageSlidingTabStripFragment.TAG).commit();
            break;
        default:
            SherlockFragment fragment = new PlanetFragment();
            Bundle args = new Bundle();
            args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);
            fragment.setArguments(args);
            getSupportFragmentManager().beginTransaction().add(R.id.content, fragment).commit();
            break;
    }
    mDrawerLayout.closeDrawer(mDrawerList);
}
Also used : Bundle(android.os.Bundle) SherlockFragment(com.actionbarsherlock.app.SherlockFragment)

Example 2 with SherlockFragment

use of com.actionbarsherlock.app.SherlockFragment in project Wallpaper-Manager by Bencodes.

the class HomeActivity method onCategorySelected.

@Override
public void onCategorySelected(NodeCategory node) {
    final SherlockFragment frag = new CategoryFragment();
    final Bundle args = new Bundle();
    args.putSerializable(CategoryFragment.BUNDLE_TAG, node.wallpaperList);
    frag.setArguments(args);
    this.addFragment(frag, CategoryFragment.FRAGMENT_TAG, true);
}
Also used : Bundle(android.os.Bundle) SherlockFragment(com.actionbarsherlock.app.SherlockFragment)

Example 3 with SherlockFragment

use of com.actionbarsherlock.app.SherlockFragment in project Wallpaper-Manager by Bencodes.

the class HomeActivity method onWallpaperSelected.

@Override
public void onWallpaperSelected(NodeWallpaper node) {
    final SherlockFragment frag = new WallpaperFragment();
    final Bundle args = new Bundle();
    args.putSerializable(WallpaperFragment.BUNDLE_TAG, node);
    frag.setArguments(args);
    this.addFragment(frag, WallpaperFragment.FRAGMENT_TAG, false);
}
Also used : Bundle(android.os.Bundle) SherlockFragment(com.actionbarsherlock.app.SherlockFragment)

Aggregations

Bundle (android.os.Bundle)3 SherlockFragment (com.actionbarsherlock.app.SherlockFragment)3