// Path: library/src/main/java/com/veinhorn/scrollgalleryview/loader/MediaLoader.java
// public interface MediaLoader {
// 
//     /**
//      * @return true if implementation load's image, otherwise false
//      */
//     boolean isImage();
// 
//     /**
//      * Loads image and sets it to imageView. After that implementation can call callback to set imageView's
//      * scale type to ScaleType.FIT_CENTER.
//      */
//     void loadMedia(Context context, ImageView imageView, SuccessCallback callback);
// 
//     /**
//      * Loads thumbnail image and sets it to thumbnailView. After that implementation can call callback
//      * to set thumbnailView's scale type to ScaleType.FIT_CENTER.
//      */
// 
//     void loadThumbnail(Context context, ImageView thumbnailView, SuccessCallback callback);
// 
//     /**
//      * Implementation may call this callback for report to imageView, what it's image was changed
//      */
//     interface SuccessCallback {
//         void onSuccess();
//     }
// }


import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.github.chrisbanes.photoview.PhotoView;
import com.veinhorn.scrollgalleryview.loader.MediaLoader;
            });
        }
        if (onImageLongClickListener != null) {
            photoView.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    onImageLongClickListener.onClick(getPosition());
                    return true;
                }
            });
        }

        viewPager = (HackyViewPager) getActivity().findViewById(R.id.viewPager);

        if (savedInstanceState != null) {
            boolean isLocked = savedInstanceState.getBoolean(Constants.IS_LOCKED, false);
            viewPager.setLocked(isLocked);
        }

        loadImageToView();

        return rootView;
    }

    private int getPosition() {
        return getArguments().getInt(Constants.POSITION);
    }

    private void loadImageToView() {
        if (mMediaInfo != null) {
// Path: library/src/main/java/com/veinhorn/scrollgalleryview/loader/MediaLoader.java
// public interface MediaLoader {
// 
//     /**
//      * @return true if implementation load's image, otherwise false
//      */
//     boolean isImage();
// 
//     /**
//      * Loads image and sets it to imageView. After that implementation can call callback to set imageView's
//      * scale type to ScaleType.FIT_CENTER.
//      */
//     void loadMedia(Context context, ImageView imageView, SuccessCallback callback);
// 
//     /**
//      * Loads thumbnail image and sets it to thumbnailView. After that implementation can call callback
//      * to set thumbnailView's scale type to ScaleType.FIT_CENTER.
//      */
// 
//     void loadThumbnail(Context context, ImageView thumbnailView, SuccessCallback callback);
// 
//     /**
//      * Implementation may call this callback for report to imageView, what it's image was changed
//      */
//     interface SuccessCallback {
//         void onSuccess();
//     }
// }


// Path: library/src/main/java/com/veinhorn/scrollgalleryview/ImageFragment.java
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.github.chrisbanes.photoview.PhotoView;
import com.veinhorn.scrollgalleryview.loader.MediaLoader;

            });
        }
        if (onImageLongClickListener != null) {
            photoView.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    onImageLongClickListener.onClick(getPosition());
                    return true;
                }
            });
        }

        viewPager = (HackyViewPager) getActivity().findViewById(R.id.viewPager);

        if (savedInstanceState != null) {
            boolean isLocked = savedInstanceState.getBoolean(Constants.IS_LOCKED, false);
            viewPager.setLocked(isLocked);
        }

        loadImageToView();

        return rootView;
    }

    private int getPosition() {
        return getArguments().getInt(Constants.POSITION);
    }

    private void loadImageToView() {
        if (mMediaInfo != null) {
            mMediaInfo.getLoader().loadMedia(getActivity(), photoView, new MediaLoader.SuccessCallback() {