openaphid / android-flip

A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android
http://openaphid.github.com/
2.84k stars 1.25k forks source link

How to reload layout in flipview #11

Closed hoangpn412 closed 11 years ago

hoangpn412 commented 11 years ago

I'm using gripview, and I have a problem below:

         public View getView(int position, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub
        View layout = convertView;

        flip_position = position - 1;

        if (position == 0) {
            layout = inflater.inflate(R.layout.index, null);
            setIndexLayoutView(layout);
        }
        else { 
            layout = inflater.inflate(R.layout.index2, null);
            setIndexLayoutView2(layout);
        }
        return layout;
    }

I have only way to setIndexLayoutView in getView. I want to call setIndexLayoutView from other method.

Please help me ! Thanks and BR !

openaphid commented 11 years ago

I have no idea what setIndexLayoutView is.

Please try FlipViewController.refreshPage if you want to keep the animated content consistent with your reloaded layout. FlipAsyncContentActivity demonstrates how to use it in practice.

openaphid commented 11 years ago

Close it as no more inputs for several days