JakeWharton/ViewPagerIndicator

I make a call and return the application gets white background

Closed this issue · 4 comments

When I make a call and return to the application below the screen turns white tabpageindicator losing everything that was loaded so that the application is started.
What should not be done to keep this blank screen after making a call?

tela_branca

This library is not responsible for loading the contents of your ViewPager. Try asking on StackOverflow or the official Android developer mailing list.

Ok, thanks ! :)

Even if the library is not responsible for loading the contents it should show us a sample on how to work around with filling the adapter.The sample which you have provided ,we code out according to that and we have this problem.. you should provide us a solution for that..

Here is the code:

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        v = inflater.inflate(R.layout.frag_pager, container, false);
        instance = this;
        mAdapter = new FragmentAdapter(getActivity().getFragmentManager());

        mPager = (ViewPager) v.findViewById(R.id.pager);
        mPager.setAdapter(mAdapter);

        mIndicator = (TitlePageIndicator) v.findViewById(R.id.indicator);
        mIndicator.setViewPager(mPager);
        setRetainInstance(true);
        return v;

    }

I just have the same problem previously. But change from using Fragment to AppCompatActivity solve the problem.