jacobtabak / Fragment-Switcher

An instance-state saving fragment switcher, intended for use with navigation drawers or tabs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When I have some network request, your framework doesn't work.

angelen10 opened this issue · comments

Please provide some more information and steps to reproduce.

On Wed, Mar 18, 2015, 8:04 PM 俨小良 notifications@github.com wrote:


Reply to this email directly or view it on GitHub
#4.

Picture 1 Picture 2
Look at the picture above, the function I want is : There are four different fragments in an Activity, and each fragment has its own network request. For example, in one of my fragment,

StringRequest stringRequest = new StringRequest(
                Request.Method.POST,
                url,
                new Response.Listener<String>() {
                    @Override
                    public void onResponse(String s) {
                        // Fill response data to ListView or GridView.
                    }
                },
                new Response.ErrorListener() {
                    @Override
                    public void onErrorResponse(VolleyError volleyError) {
                    }
                });
        App.get().getRequestQueue().add(stringRequest);

But when I switch to other fragment and switch back, it can not retain the state.
Sorry for my poor English.