// Path: sample/src/main/java/ru/noties/scrollable/sample/ViewTypeItem.java
// public class ViewTypeItem extends ViewType<String, ViewTypeItem.ItemHolder> {
// 
//     @Override
//     public ItemHolder createView(LayoutInflater inflater, ViewGroup parent) {
//         return new ItemHolder(inflater.inflate(R.layout.vt_item, parent, false));
//     }
// 
//     @Override
//     public void bindView(Context context, ItemHolder holder, String item, List<Object> payloads) {
//         holder.view.setText(item);
//     }
// 
//     public static class ItemHolder extends HolderSingle<TextView> {
//         ItemHolder(View itemView) {
//             super(itemView);
//         }
//     }
// }
// 
// Path: sample/src/main/java/ru/noties/scrollable/sample/ItemsGenerator.java
// public class ItemsGenerator {
// 
//     public static List<String> generate(int count) {
//         final List<String> list = new ArrayList<>(count);
//         for (int i = 0; i < count; i++) {
//             list.add("Item #" + i);
//         }
//         return list;
//     }
// 
//     private ItemsGenerator() {}
// }


import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import ru.noties.scrollable.sample.R;
import ru.noties.scrollable.sample.ViewTypeItem;
import ru.noties.scrollable.sample.ItemsGenerator;
package ru.noties.scrollable.sample.pager.fragment;



public class FragmentPagerFragmentScrollView extends FragmentPagerFragment {

    private ScrollView mScrollView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle sis) {
        return inflater.inflate(R.layout.fragment_pager_scroll_view, parent, false);
    }

    @Override
    public void onViewCreated(View view, Bundle sis) {
        super.onViewCreated(view, sis);

        mScrollView = findView(R.id.scroll_view);

        // generate mock items
        final Context context = getContext();
        final LayoutInflater inflater = LayoutInflater.from(context);
        final LinearLayout linearLayout = findView(mScrollView, R.id.linear_layout);
        final ViewTypeItem viewTypeItem = new ViewTypeItem();
        ViewTypeItem.ItemHolder holder;
// Path: sample/src/main/java/ru/noties/scrollable/sample/ViewTypeItem.java
// public class ViewTypeItem extends ViewType<String, ViewTypeItem.ItemHolder> {
// 
//     @Override
//     public ItemHolder createView(LayoutInflater inflater, ViewGroup parent) {
//         return new ItemHolder(inflater.inflate(R.layout.vt_item, parent, false));
//     }
// 
//     @Override
//     public void bindView(Context context, ItemHolder holder, String item, List<Object> payloads) {
//         holder.view.setText(item);
//     }
// 
//     public static class ItemHolder extends HolderSingle<TextView> {
//         ItemHolder(View itemView) {
//             super(itemView);
//         }
//     }
// }
// 
// Path: sample/src/main/java/ru/noties/scrollable/sample/ItemsGenerator.java
// public class ItemsGenerator {
// 
//     public static List<String> generate(int count) {
//         final List<String> list = new ArrayList<>(count);
//         for (int i = 0; i < count; i++) {
//             list.add("Item #" + i);
//         }
//         return list;
//     }
// 
//     private ItemsGenerator() {}
// }


// Path: sample/src/main/java/ru/noties/scrollable/sample/pager/fragment/FragmentPagerFragmentScrollView.java
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import ru.noties.scrollable.sample.R;
import ru.noties.scrollable.sample.ViewTypeItem;
import ru.noties.scrollable.sample.ItemsGenerator;

package ru.noties.scrollable.sample.pager.fragment;



public class FragmentPagerFragmentScrollView extends FragmentPagerFragment {

    private ScrollView mScrollView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle sis) {
        return inflater.inflate(R.layout.fragment_pager_scroll_view, parent, false);
    }

    @Override
    public void onViewCreated(View view, Bundle sis) {
        super.onViewCreated(view, sis);

        mScrollView = findView(R.id.scroll_view);

        // generate mock items
        final Context context = getContext();
        final LayoutInflater inflater = LayoutInflater.from(context);
        final LinearLayout linearLayout = findView(mScrollView, R.id.linear_layout);
        final ViewTypeItem viewTypeItem = new ViewTypeItem();
        ViewTypeItem.ItemHolder holder;
        for (String item: ItemsGenerator.generate(33)) {