package com.mschwartz.bsnstemplate.example;

import android.content.SharedPreferences;

import com.mschwartz.bsnstemplate.R;
import com.mschwartz.bsnstemplate.core.AbstractDbEntry2paneFragment;
import com.mschwartz.bsnstemplate.core.AbstractListFragment;

/**
 * Created by Mike on 9/21/2016.
 */
public class Item2paneFragment extends AbstractDbEntry2paneFragment<DbItem> {

    private static final String TAG = Item2paneFragment.class.getCanonicalName();

    public static Item2paneFragment newInstance() {
        Item2paneFragment fragment = new Item2paneFragment();
        return fragment;
    }

    @Override
    protected void preinit(SharedPreferences preferences) throws Exception {
        super.preinit(preferences);

        listFragment = ItemList2Fragment.newInstance(30, AbstractListFragment.LISTMODE_NORMAL);
        listFragment.setTargetFragment(this, R.string.request_list_events);

        editFragment = ItemEditFragment.newInstance(null);
        editFragment.setTargetFragment(this, R.string.request_edit_events);

    }

    @Override
    protected String getFragmentname() {
        return "Item2paneFragment";
    }
}
