emilsjolander/android-FlipView

How to getView in exibition

Opened this issue · 0 comments

I'm using your library and am very happy with it .

But I have a problem , I 'm loading images on the internet .

I need to load the image by index , and the method which I believe is what comes back to me is the onFlippedToPage method.

But when I try to get the corresponding view to display page it returns me null

@Override
public void onFlippedToPage(FlipView v, int position, long id) {
    Log.i("pageflip", "Page: " + position);
    View _view = null;
   _view = v.getChildAt(position);
    if(_view != null){
        ImageView img_left = (ImageView) _view.findViewById(R.id.imgLeftBook);
        if(img_left != null){
            img_left.setImageDrawable(getResources().getDrawable(R.drawable.ic_book_reload));
        }else{
            Log.i("pageflip", "img_left empty: " + position);
        }
    }else{
        Log.i("pageflip", "View empty: " + position);
    }
}