// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListener.java
// public interface RecyclerViewOnClickListener<T> {
//     void onItemClick(T item);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListenerInternal.java
// public interface RecyclerViewOnClickListenerInternal {
//     void onItemClick(int position);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/models/DeclaredPermission.java
// public class DeclaredPermission {
// 
//     private String mName;
//     private String mLabel;
//     private ArrayList<String> mProtectionLevel;
//     private ArrayList<String> mFlags;
// 
//     public DeclaredPermission(String mName, String mLabel, ArrayList<String> mProtectionLevel, ArrayList<String> mFlags) {
//         this.mLabel = mLabel;
//         this.mName = mName;
//         this.mProtectionLevel = mProtectionLevel;
//         this.mFlags = mFlags;
//     }
// 
//     public String getLabel() {
//         return mLabel;
//     }
// 
//     public String getName() {
//         return mName;
//     }
// 
//     public ArrayList<String> getProtectionLevel() {
//         return mProtectionLevel;
//     }
// 
//     public ArrayList<String> getFlags() { return mFlags; }
// }


import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.livingstoneapp.R;
import com.livingstoneapp.helpers.RecyclerViewOnClickListener;
import com.livingstoneapp.helpers.RecyclerViewOnClickListenerInternal;
import com.livingstoneapp.models.DeclaredPermission;
        if (mData.get(position).getProtectionLevel().size() > 0) {
            holder.tvProtectionLevelHeader.setVisibility(View.VISIBLE);
            holder.tvProtectionLevel.setVisibility(View.VISIBLE);

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < mData.get(position).getProtectionLevel().size(); i++) {
                if (i != 0)
                    sb.append("\n");

                sb.append(mData.get(position).getProtectionLevel().get(i));
            }
            holder.tvProtectionLevel.setText(sb);
        } else {
            holder.tvProtectionLevelHeader.setVisibility(View.GONE);
            holder.tvProtectionLevel.setVisibility(View.GONE);
        }

        if (mData.get(position).getFlags().size() > 0) {
            holder.tvFlagsHeader.setVisibility(View.VISIBLE);
            holder.tvFlags.setVisibility(View.VISIBLE);
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < mData.get(position).getFlags().size(); i++) {
                if (i != 0)
                    sb.append("\n");

                sb.append(mData.get(position).getFlags().get(i));
            }
            holder.tvFlags.setText(sb);
        } else {
            holder.tvFlagsHeader.setVisibility(View.GONE);
// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListener.java
// public interface RecyclerViewOnClickListener<T> {
//     void onItemClick(T item);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListenerInternal.java
// public interface RecyclerViewOnClickListenerInternal {
//     void onItemClick(int position);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/models/DeclaredPermission.java
// public class DeclaredPermission {
// 
//     private String mName;
//     private String mLabel;
//     private ArrayList<String> mProtectionLevel;
//     private ArrayList<String> mFlags;
// 
//     public DeclaredPermission(String mName, String mLabel, ArrayList<String> mProtectionLevel, ArrayList<String> mFlags) {
//         this.mLabel = mLabel;
//         this.mName = mName;
//         this.mProtectionLevel = mProtectionLevel;
//         this.mFlags = mFlags;
//     }
// 
//     public String getLabel() {
//         return mLabel;
//     }
// 
//     public String getName() {
//         return mName;
//     }
// 
//     public ArrayList<String> getProtectionLevel() {
//         return mProtectionLevel;
//     }
// 
//     public ArrayList<String> getFlags() { return mFlags; }
// }


// Path: app/src/main/java/com/livingstoneapp/adapters/DeclaredPermissionsAdapter.java
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.livingstoneapp.R;
import com.livingstoneapp.helpers.RecyclerViewOnClickListener;
import com.livingstoneapp.helpers.RecyclerViewOnClickListenerInternal;
import com.livingstoneapp.models.DeclaredPermission;

        if (mData.get(position).getProtectionLevel().size() > 0) {
            holder.tvProtectionLevelHeader.setVisibility(View.VISIBLE);
            holder.tvProtectionLevel.setVisibility(View.VISIBLE);

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < mData.get(position).getProtectionLevel().size(); i++) {
                if (i != 0)
                    sb.append("\n");

                sb.append(mData.get(position).getProtectionLevel().get(i));
            }
            holder.tvProtectionLevel.setText(sb);
        } else {
            holder.tvProtectionLevelHeader.setVisibility(View.GONE);
            holder.tvProtectionLevel.setVisibility(View.GONE);
        }

        if (mData.get(position).getFlags().size() > 0) {
            holder.tvFlagsHeader.setVisibility(View.VISIBLE);
            holder.tvFlags.setVisibility(View.VISIBLE);
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < mData.get(position).getFlags().size(); i++) {
                if (i != 0)
                    sb.append("\n");

                sb.append(mData.get(position).getFlags().get(i));
            }
            holder.tvFlags.setText(sb);
        } else {
            holder.tvFlagsHeader.setVisibility(View.GONE);
            holder.tvFlags.setVisibility(View.GONE);