package circlebinder.common.app;

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

import net.ichigotake.common.os.RestoreBundle;
import net.ichigotake.common.view.inputmethod.SoftInput;

/**
 * 全てのフラグメントの基底クラス
 */
abstract public class BaseFragment extends Fragment {

    private RestoreBundle restoreBundle;

    protected RestoreBundle getRestoreBundle(Bundle savedInstanceState) {
        if (restoreBundle == null) {
            restoreBundle = new RestoreBundle(this, savedInstanceState);
        }
        return restoreBundle;
    }

    @Override
    public void onResume() {
        super.onResume();
        SoftInput.hide(getView());
    }
}

@@ -92,16 +92,65 @@
 ragment;
+%0Aimport android.support.v7.app.ActionBarActivity;
 %0A%0Aimport
@@ -603,16 +603,127 @@
 %0A    %7D%0A%0A
+    protected ActionBarActivity getSupportActivity() %7B%0A        return (ActionBarActivity)getActivity();%0A    %7D%0A%0A
     @Ove

add BaseFragment#getSupportActivity