package com.stanfy.integration.sherlock.enroscar;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.stanfy.integration.R;
import com.stanfy.integration.sherlock.SherlockFragmentActivity;


public abstract class SherlockOneFragmentActivity extends SherlockFragmentActivity {

  /** Fragment instance. */
  private Fragment fragment;

  /** @return fragment instance */
  protected abstract Fragment createFragment(final Bundle savedInstanceState);

  /** @return layout identifier */
  protected abstract int getLayoutId();

  /** Fragment container ID. */
  protected int getFragmentContainerId() { return R.id.fragment_container; }

  /** @return the fragment */
  public Fragment getFragment() { return fragment; }

  @Override
  protected void onInitialize(final Bundle savedInstanceState) {
    super.onInitialize(savedInstanceState);
    final int layoutId = getLayoutId();
    if (layoutId != 0) { setContentView(layoutId); }
    final FragmentManager manager = getSupportFragmentManager();
    final int containerId = getFragmentContainerId();
    Fragment f = manager.findFragmentById(containerId);
    if (f == null) {
      f = createFragment(savedInstanceState);
      if (f != null) {
        getSupportFragmentManager().beginTransaction()
          .add(containerId, f)
          .commit();
      }
    }
    this.fragment = f;
  }

}

@@ -162,41 +162,8 @@
 r;%0A%0A
-import com.stanfy.integration.R;%0A
 impo
@@ -604,16 +604,25 @@
 otected 
+abstract 
 int getF
@@ -645,44 +645,9 @@
 Id()
- %7B return R.id.fragment_container; %7D
+;
 %0A%0A  

fix R class dependency