Search in sources :

Example 1 with PreferencesCookieStore

use of com.lidroid.xutils.util.PreferencesCookieStore in project xUtils by wyouflf.

the class HttpFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.http_fragment, container, false);
    ViewUtils.inject(this, view);
    mAppContext = inflater.getContext().getApplicationContext();
    downloadManager = DownloadService.getDownloadManager(mAppContext);
    preferencesCookieStore = new PreferencesCookieStore(mAppContext);
    BasicClientCookie cookie = new BasicClientCookie("test", "hello");
    cookie.setDomain("192.168.1.5");
    cookie.setPath("/");
    preferencesCookieStore.addCookie(cookie);
    return view;
}
Also used : BasicClientCookie(org.apache.http.impl.cookie.BasicClientCookie) View(android.view.View) TextView(android.widget.TextView) PreferencesCookieStore(com.lidroid.xutils.util.PreferencesCookieStore)

Aggregations

View (android.view.View)1 TextView (android.widget.TextView)1 PreferencesCookieStore (com.lidroid.xutils.util.PreferencesCookieStore)1 BasicClientCookie (org.apache.http.impl.cookie.BasicClientCookie)1