// Path: mvvmapp/src/main/java/com/hibrianlee/mvvmapp/adapter/RecyclerViewAdapter.java
// public abstract class RecyclerViewAdapter<ITEM_T, VIEW_MODEL_T extends ItemViewModel<ITEM_T>>
//         extends RecyclerView.Adapter<RecyclerViewAdapter.ItemViewHolder<ITEM_T, VIEW_MODEL_T>> {
// 
//     protected final ArrayList<ITEM_T> items;
// 
//     private final ActivityComponent activityComponent;
// 
//     public RecyclerViewAdapter(@NonNull ActivityComponent activityComponent) {
//         this.activityComponent = activityComponent;
//         items = new ArrayList<>();
//     }
// 
//     @Override
//     public final void onBindViewHolder(ItemViewHolder<ITEM_T, VIEW_MODEL_T> holder, int position) {
//         holder.setItem(items.get(position));
//     }
// 
//     @Override
//     public int getItemCount() {
//         return items.size();
//     }
// 
//     protected final ActivityComponent getActivityComponent() {
//         return activityComponent;
//     }
// 
//     public static class ItemViewHolder<T, VT extends ItemViewModel<T>>
//             extends RecyclerView.ViewHolder {
// 
//         protected final VT viewModel;
//         private final ViewDataBinding binding;
// 
//         public ItemViewHolder(View itemView, ViewDataBinding binding, VT viewModel) {
//             super(itemView);
//             this.binding = binding;
//             this.viewModel = viewModel;
//         }
// 
//         void setItem(T item) {
//             viewModel.setItem(item);
//             binding.executePendingBindings();
//         }
//     }
// }
// 
// Path: mvvmapp/src/main/java/com/hibrianlee/mvvmapp/inject/ActivityComponent.java
// @PerActivity
// @Component(
//         dependencies = AppComponent.class,
//         modules = {ActivityModule.class})
// public interface ActivityComponent {
// 
//     void inject(ViewModel viewModel);
// }


import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import com.hibrianlee.mvvmapp.adapter.RecyclerViewAdapter;
import com.hibrianlee.mvvmapp.inject.ActivityComponent;
/*
 * Copyright (C) 2015 Brian Lee (@hiBrianLee)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hibrianlee.mvvmapp.viewmodel;



public abstract class RecyclerViewViewModel extends ViewModel {

    RecyclerView.LayoutManager layoutManager;
    private Parcelable savedLayoutManagerState;

// Path: mvvmapp/src/main/java/com/hibrianlee/mvvmapp/adapter/RecyclerViewAdapter.java
// public abstract class RecyclerViewAdapter<ITEM_T, VIEW_MODEL_T extends ItemViewModel<ITEM_T>>
//         extends RecyclerView.Adapter<RecyclerViewAdapter.ItemViewHolder<ITEM_T, VIEW_MODEL_T>> {
// 
//     protected final ArrayList<ITEM_T> items;
// 
//     private final ActivityComponent activityComponent;
// 
//     public RecyclerViewAdapter(@NonNull ActivityComponent activityComponent) {
//         this.activityComponent = activityComponent;
//         items = new ArrayList<>();
//     }
// 
//     @Override
//     public final void onBindViewHolder(ItemViewHolder<ITEM_T, VIEW_MODEL_T> holder, int position) {
//         holder.setItem(items.get(position));
//     }
// 
//     @Override
//     public int getItemCount() {
//         return items.size();
//     }
// 
//     protected final ActivityComponent getActivityComponent() {
//         return activityComponent;
//     }
// 
//     public static class ItemViewHolder<T, VT extends ItemViewModel<T>>
//             extends RecyclerView.ViewHolder {
// 
//         protected final VT viewModel;
//         private final ViewDataBinding binding;
// 
//         public ItemViewHolder(View itemView, ViewDataBinding binding, VT viewModel) {
//             super(itemView);
//             this.binding = binding;
//             this.viewModel = viewModel;
//         }
// 
//         void setItem(T item) {
//             viewModel.setItem(item);
//             binding.executePendingBindings();
//         }
//     }
// }
// 
// Path: mvvmapp/src/main/java/com/hibrianlee/mvvmapp/inject/ActivityComponent.java
// @PerActivity
// @Component(
//         dependencies = AppComponent.class,
//         modules = {ActivityModule.class})
// public interface ActivityComponent {
// 
//     void inject(ViewModel viewModel);
// }


// Path: mvvmapp/src/main/java/com/hibrianlee/mvvmapp/viewmodel/RecyclerViewViewModel.java
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import com.hibrianlee.mvvmapp.adapter.RecyclerViewAdapter;
import com.hibrianlee.mvvmapp.inject.ActivityComponent;

/*
 * Copyright (C) 2015 Brian Lee (@hiBrianLee)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hibrianlee.mvvmapp.viewmodel;



public abstract class RecyclerViewViewModel extends ViewModel {

    RecyclerView.LayoutManager layoutManager;
    private Parcelable savedLayoutManagerState;

    protected abstract RecyclerViewAdapter getAdapter();