// Path: app/src/main/java/com/botty/wall/adapter/LibsAdapter.java
// public class LibsAdapter extends RecyclerView.Adapter<LibsAdapter.MyViewHolder> {
// 
//     private List<libs_model> libs_models;
//     public Context context;
// 
//     public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
//         public TextView libsName,creator;
//         public ImageView libsLogo;
//         public CardView linkLibs;
//         private ItemClickListener clickListener;
// 
//         public MyViewHolder(View view) {
//             super(view);
//             libsName = view.findViewById(R.id.name_lib);
//             libsLogo = view.findViewById(R.id.logo_libs);
//             creator = view.findViewById(R.id.name_creator);
//             linkLibs = view.findViewById(R.id.link_libs);
// 
//             view.setOnClickListener(this);
//         }
// 
//         public void setClickListener(ItemClickListener itemClickListener) {
//             this.clickListener = itemClickListener;
//         }
// 
// 
//         @Override
//         public void onClick(View v) {
//             clickListener.onClick(v);
//         }
// 
//     }
// 
//     public LibsAdapter(List<libs_model> libs_models){
//         this.libs_models = libs_models;
//     }
// 
//     @Override
//     public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View itemView = LayoutInflater.from(parent.getContext())
//                 .inflate(R.layout.list_libs_item, parent, false);
//         return new MyViewHolder(itemView);
//     }
// 
//     @Override
//     public void onBindViewHolder(@NonNull MyViewHolder holder, final int position) {
//         if (context != null)
//             return;
//         final libs_model libsModel = libs_models.get(position);
//         holder.libsName.setText(libsModel.getNameLib());
//         holder.creator.setText(libsModel.getCreator());
// 
//         Picasso.get()
//                 .load(libsModel.getIconLib())
//                 .noFade()
//                 .into(holder.libsLogo);
//     }
// 
// 
//     @Override
//     public int getItemCount() {
//         return libs_models.size();
//     }
// }
// 
// Path: app/src/main/java/com/botty/wall/model/libs_model.java
// public class libs_model {
// 
//     private String nameLib;
//     private String linkLib;
//     private String iconLib;
//     private String creator;
// 
//     public libs_model(){
// 
//     }
// 
//     public libs_model(String nameLib, String linkLib, String iconLib, String creator){
//         this.nameLib = nameLib;
//         this.linkLib = linkLib;
//         this.iconLib = iconLib;
//         this.creator = creator;
//     }
// 
//     public void setNameLib(String nameLib) {
//         this.nameLib = nameLib;
//     }
// 
//     public String getNameLib() {
//         return nameLib;
//     }
// 
//     public void setLinkLib(String linkLib) {
//         this.linkLib = linkLib;
//     }
// 
//     public String getLinkLib() {
//         return linkLib;
//     }
// 
//     public void setIconLib(String iconLib) {
//         this.iconLib = iconLib;
//     }
// 
//     public String getIconLib() {
//         return iconLib;
//     }
// 
//     public void setCreator(String creator) {
//         this.creator = creator;
//     }
// 
//     public String getCreator() {
//         return creator;
//     }
// }


import android.os.Bundle;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import com.botty.wall.R;
import com.botty.wall.adapter.LibsAdapter;
import com.botty.wall.model.libs_model;
import java.util.ArrayList;
import java.util.List;
package com.botty.wall.fragment;




public class LibsFragment extends BaseFragment {

    private LibsAdapter libsAdapter;
    private StaggeredGridLayoutManager staggeredGridLayoutManager;
    private List<libs_model> libs_models = new ArrayList<>();

    public LibsFragment(){

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.recycler_view, container, false);

        recyclerView = rootView.findViewById(R.id.recycler_view);

        libsAdapter = new LibsAdapter(libs_models);
        staggeredGridLayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(staggeredGridLayoutManager);
        recyclerView.setAdapter(libsAdapter);

        loadLink();

        return rootView;
    }

    public void loadLink() {
        libs_model libsModel;

        libsModel = new libs_model("Android Support Library", "https://developer.android.com/topic/libraries/support-library/", "https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/android/android.png", "The Android Open Source Project");
        libs_models.add(libsModel);

        libsModel = new libs_model("Ion", "https://github.com/koush/ion", "https://avatars3.githubusercontent.com/u/73924?s=400&v=4", "koush");
// Path: app/src/main/java/com/botty/wall/adapter/LibsAdapter.java
// public class LibsAdapter extends RecyclerView.Adapter<LibsAdapter.MyViewHolder> {
// 
//     private List<libs_model> libs_models;
//     public Context context;
// 
//     public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
//         public TextView libsName,creator;
//         public ImageView libsLogo;
//         public CardView linkLibs;
//         private ItemClickListener clickListener;
// 
//         public MyViewHolder(View view) {
//             super(view);
//             libsName = view.findViewById(R.id.name_lib);
//             libsLogo = view.findViewById(R.id.logo_libs);
//             creator = view.findViewById(R.id.name_creator);
//             linkLibs = view.findViewById(R.id.link_libs);
// 
//             view.setOnClickListener(this);
//         }
// 
//         public void setClickListener(ItemClickListener itemClickListener) {
//             this.clickListener = itemClickListener;
//         }
// 
// 
//         @Override
//         public void onClick(View v) {
//             clickListener.onClick(v);
//         }
// 
//     }
// 
//     public LibsAdapter(List<libs_model> libs_models){
//         this.libs_models = libs_models;
//     }
// 
//     @Override
//     public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//         View itemView = LayoutInflater.from(parent.getContext())
//                 .inflate(R.layout.list_libs_item, parent, false);
//         return new MyViewHolder(itemView);
//     }
// 
//     @Override
//     public void onBindViewHolder(@NonNull MyViewHolder holder, final int position) {
//         if (context != null)
//             return;
//         final libs_model libsModel = libs_models.get(position);
//         holder.libsName.setText(libsModel.getNameLib());
//         holder.creator.setText(libsModel.getCreator());
// 
//         Picasso.get()
//                 .load(libsModel.getIconLib())
//                 .noFade()
//                 .into(holder.libsLogo);
//     }
// 
// 
//     @Override
//     public int getItemCount() {
//         return libs_models.size();
//     }
// }
// 
// Path: app/src/main/java/com/botty/wall/model/libs_model.java
// public class libs_model {
// 
//     private String nameLib;
//     private String linkLib;
//     private String iconLib;
//     private String creator;
// 
//     public libs_model(){
// 
//     }
// 
//     public libs_model(String nameLib, String linkLib, String iconLib, String creator){
//         this.nameLib = nameLib;
//         this.linkLib = linkLib;
//         this.iconLib = iconLib;
//         this.creator = creator;
//     }
// 
//     public void setNameLib(String nameLib) {
//         this.nameLib = nameLib;
//     }
// 
//     public String getNameLib() {
//         return nameLib;
//     }
// 
//     public void setLinkLib(String linkLib) {
//         this.linkLib = linkLib;
//     }
// 
//     public String getLinkLib() {
//         return linkLib;
//     }
// 
//     public void setIconLib(String iconLib) {
//         this.iconLib = iconLib;
//     }
// 
//     public String getIconLib() {
//         return iconLib;
//     }
// 
//     public void setCreator(String creator) {
//         this.creator = creator;
//     }
// 
//     public String getCreator() {
//         return creator;
//     }
// }


// Path: app/src/main/java/com/botty/wall/fragment/LibsFragment.java
import android.os.Bundle;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import com.botty.wall.R;
import com.botty.wall.adapter.LibsAdapter;
import com.botty.wall.model.libs_model;
import java.util.ArrayList;
import java.util.List;

package com.botty.wall.fragment;




public class LibsFragment extends BaseFragment {

    private LibsAdapter libsAdapter;
    private StaggeredGridLayoutManager staggeredGridLayoutManager;
    private List<libs_model> libs_models = new ArrayList<>();

    public LibsFragment(){

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.recycler_view, container, false);

        recyclerView = rootView.findViewById(R.id.recycler_view);

        libsAdapter = new LibsAdapter(libs_models);
        staggeredGridLayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(staggeredGridLayoutManager);
        recyclerView.setAdapter(libsAdapter);

        loadLink();

        return rootView;
    }

    public void loadLink() {
        libs_model libsModel;

        libsModel = new libs_model("Android Support Library", "https://developer.android.com/topic/libraries/support-library/", "https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/android/android.png", "The Android Open Source Project");
        libs_models.add(libsModel);

        libsModel = new libs_model("Ion", "https://github.com/koush/ion", "https://avatars3.githubusercontent.com/u/73924?s=400&v=4", "koush");
        libs_models.add(libsModel);