package cn.bjtu.nourriture.fragments;

import android.app.Fragment;

/**
 * Created by sylflo on 12/13/15.
 */
public class LogoutFragment extends Fragment {

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

@@ -51,241 +51,1067 @@
 oid.
-app.Fragment;%0A%0A/**%0A * Created by sylflo on 12/13/15.%0A */%0Apublic class LogoutFragment extends Fragment %7B%0A%0A    public static LogoutFragment newInstance() %7B%0A        LogoutFragment fragment = new LogoutFragment();%0A        return fragment
+content.Context;%0Aimport android.content.Intent;%0Aimport android.content.SharedPreferences;%0Aimport android.support.v4.app.Fragment;%0Aimport android.os.Bundle;%0A%0Aimport cn.bjtu.nourriture.AnonymousActivity;%0Aimport cn.bjtu.nourriture.R;%0A%0A/**%0A * Created by sylflo on 12/13/15.%0A */%0Apublic class LogoutFragment extends Fragment %7B%0A%0A    public static LogoutFragment newInstance() %7B%0A        LogoutFragment fragment = new LogoutFragment();%0A        return fragment;%0A    %7D%0A%0A    @Override%0A    public void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A%0A        SharedPreferences preferences = getActivity().getSharedPreferences(%0A                %22GLOBAL%22, Context.MODE_PRIVATE);%0A        SharedPreferences.Editor editor = preferences.edit();%0A        editor.remove(getString(R.string.username_pref));%0A        editor.remove(getString(R.string.token_pref));%0A        editor.remove(getString(R.string.user_id_pref));%0A        editor.apply();%0A%0A        Intent intent = new Intent(getActivity(), AnonymousActivity.class);%0A        startActivity(intent)
 ;%0A  

add logout