package com.naijab.nextzytimeline.base;

public abstract class BaseFragment {
}

@@ -38,43 +38,1947 @@
 e;%0A%0A
-public abstract class BaseFragment %7B
+import android.content.Context;%0Aimport android.os.Bundle;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.v4.app.Fragment;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.view.inputmethod.InputMethodManager;%0Aimport android.widget.Toast;%0A%0Apublic abstract class BaseFragment extends Fragment%7B%0A%0A    @Override%0A    public void onCreate(@Nullable Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        if (savedInstanceState == null) %7B%0A        %7D else %7B%0A            onRestoreInstanceState(savedInstanceState);%0A        %7D%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public View onCreateView(LayoutInflater inflater, ViewGroup container,%0A                             Bundle savedInstanceState) %7B%0A        int layoutResId = getLayoutView();%0A        return inflater.inflate(layoutResId, container, false);%0A    %7D%0A%0A    @Override%0A    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) %7B%0A        super.onViewCreated(view, savedInstanceState);%0A        bindView(view);%0A        setupInstance();%0A        setupView();%0A        if (savedInstanceState == null) %7B%0A            initialize();%0A        %7D%0A    %7D%0A%0A    public void onRestoreInstanceState(Bundle savedInstanceState) %7B%0A    %7D%0A%0A    public abstract int getLayoutView();%0A%0A    public abstract void bindView(View view);%0A%0A    public abstract void setupInstance();%0A%0A    public abstract void setupView();%0A%0A    public abstract void initialize();%0A%0A    public void hideKeyboard()%7B%0A        View view = this.getActivity().getCurrentFocus();%0A        if (view != null) %7B%0A            InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);%0A            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);%0A        %7D%0A    %7D%0A%0A    public void showToast(String message)%7B%0A        Toast.makeText(getActivity(), %22%22 + message, Toast.LENGTH_SHORT).show();%0A    %7D
 %0A%7D%0A

Add Base Fragment