package com.kdanmobile.kdan_others_library_for_android.model;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Shan on 2017/5/23.
 */

public class CardOrderSharePreHandler {

    private SharedPreferences sharedPreferences;

    private SharedPreferences.Editor editor;

    public final static String CARD_ORDER = "card_order";

    public CardOrderSharePreHandler(Context context,String cardOrderSharePreId){
        sharedPreferences = context.getSharedPreferences(cardOrderSharePreId, Context.MODE_PRIVATE);
        editor = sharedPreferences.edit();
    }

    public void setCardOrder(String cardOrder){
        editor.putString(CARD_ORDER,cardOrder).commit();
    }

    public String getCardOrder(){
        return  sharedPreferences.getString(CARD_ORDER,"");
    }
}
