// Path: app/src/main/java/com/ragdroid/dahaka/activity/items/list/ItemsAdapter.java
// public class ItemsAdapter extends RecyclerView.Adapter<ItemsAdapter.ItemsViewHolder> {
// 
//     List<String> items = new ArrayList<>();
//     @Inject
//     public ItemsAdapter() {
// 
//     }
// 
//     @Override
//     public ItemsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_held, parent, false);
//         return new ItemsViewHolder(view);
//     }
// 
//     @Override
//     public void onBindViewHolder(ItemsViewHolder holder, int position) {
//         String move = items.get(position);
//         holder.dataBinding.setMove(move);
//     }
// 
//     public void updateList(List<String> items) {
//         this.items.clear();
//         this.items.addAll(items);
//         notifyDataSetChanged();
//     }
// 
//     @Override
//     public int getItemCount() {
//         return items.size();
//     }
// 
//     public class ItemsViewHolder extends RecyclerView.ViewHolder {
// 
//         private final ItemHeldBinding dataBinding;
// 
//         public ItemsViewHolder(View itemView) {
//             super(itemView);
//             dataBinding = DataBindingUtil.bind(itemView);
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/ragdroid/dahaka/user/BaseUserActivity.java
// public abstract class BaseUserActivity<T extends BasePresenter> extends BaseActivity<T> {
// 
//     @Inject UserManager userManager;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         if (!userManager.isLoggedIn()) {
//             finishView();
//         }
//     }
// 
//     @Override
//     protected void androidInject() {
//         AndroidInjection.inject(this);
//     }
// 
//     protected void logoutUser() {
//         userManager.logOut();
//         finishView();
//     }
// 
// 
// }


import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.Toolbar;
import com.ragdroid.dahaka.R;
import com.ragdroid.dahaka.activity.items.list.ItemsAdapter;
import com.ragdroid.dahaka.databinding.ActivityItemsBinding;
import com.ragdroid.dahaka.user.BaseUserActivity;
import javax.inject.Inject;
package com.ragdroid.dahaka.activity.items;




/**
 * Created by garimajain on 19/08/17.
 */

public class ItemsActivity extends BaseUserActivity<ItemsContract.Presenter> implements ItemsContract.View {

    @Inject ItemsAdapter adapter;
    @Inject LinearLayoutManager linearLayoutManager;
    @Inject DividerItemDecoration dividerItemDecoration;
    private ActivityItemsBinding binding;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        binding = DataBindingUtil.setContentView(this, R.layout.activity_items);
        super.onCreate(savedInstanceState);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back);
        toolbar.setNavigationOnClickListener(view -> finish());
    }

    @Override
// Path: app/src/main/java/com/ragdroid/dahaka/activity/items/list/ItemsAdapter.java
// public class ItemsAdapter extends RecyclerView.Adapter<ItemsAdapter.ItemsViewHolder> {
// 
//     List<String> items = new ArrayList<>();
//     @Inject
//     public ItemsAdapter() {
// 
//     }
// 
//     @Override
//     public ItemsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_held, parent, false);
//         return new ItemsViewHolder(view);
//     }
// 
//     @Override
//     public void onBindViewHolder(ItemsViewHolder holder, int position) {
//         String move = items.get(position);
//         holder.dataBinding.setMove(move);
//     }
// 
//     public void updateList(List<String> items) {
//         this.items.clear();
//         this.items.addAll(items);
//         notifyDataSetChanged();
//     }
// 
//     @Override
//     public int getItemCount() {
//         return items.size();
//     }
// 
//     public class ItemsViewHolder extends RecyclerView.ViewHolder {
// 
//         private final ItemHeldBinding dataBinding;
// 
//         public ItemsViewHolder(View itemView) {
//             super(itemView);
//             dataBinding = DataBindingUtil.bind(itemView);
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/ragdroid/dahaka/user/BaseUserActivity.java
// public abstract class BaseUserActivity<T extends BasePresenter> extends BaseActivity<T> {
// 
//     @Inject UserManager userManager;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         if (!userManager.isLoggedIn()) {
//             finishView();
//         }
//     }
// 
//     @Override
//     protected void androidInject() {
//         AndroidInjection.inject(this);
//     }
// 
//     protected void logoutUser() {
//         userManager.logOut();
//         finishView();
//     }
// 
// 
// }


// Path: app/src/main/java/com/ragdroid/dahaka/activity/items/ItemsActivity.java
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.Toolbar;
import com.ragdroid.dahaka.R;
import com.ragdroid.dahaka.activity.items.list.ItemsAdapter;
import com.ragdroid.dahaka.databinding.ActivityItemsBinding;
import com.ragdroid.dahaka.user.BaseUserActivity;
import javax.inject.Inject;

package com.ragdroid.dahaka.activity.items;




/**
 * Created by garimajain on 19/08/17.
 */

public class ItemsActivity extends BaseUserActivity<ItemsContract.Presenter> implements ItemsContract.View {

    @Inject ItemsAdapter adapter;
    @Inject LinearLayoutManager linearLayoutManager;
    @Inject DividerItemDecoration dividerItemDecoration;
    private ActivityItemsBinding binding;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        binding = DataBindingUtil.setContentView(this, R.layout.activity_items);
        super.onCreate(savedInstanceState);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back);
        toolbar.setNavigationOnClickListener(view -> finish());
    }

    @Override
    public void showModel(ItemsModel model) {