@@ -0,0 +1,1813 @@
+package com.example.profbola.bakingtime.utils;%0A%0Aimport android.content.Context;%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.TextView;%0A%0Aimport com.example.profbola.bakingtime.R;%0Aimport com.example.profbola.bakingtime.models.Step;%0A%0A/**%0A * Created by prof.BOLA on 7/2/2017.%0A */%0A%0Apublic class StepAdapter extends RecyclerView.Adapter%3CStepAdapter.StepViewHolder%3E %7B%0A%0A    private Context mContext;%0A    private Step%5B%5D mSteps;%0A%0A    public StepAdapter(Context context) %7B%0A        mContext = context;%0A    %7D%0A%0A    @Override%0A    public StepAdapter.StepViewHolder onCreateViewHolder(ViewGroup parent, int viewType) %7B%0A        View view = LayoutInflater.from(mContext)%0A                .inflate(R.layout.step, parent, false);%0A%0A        return new StepViewHolder(view);%0A    %7D%0A%0A    @Override%0A    public void onBindViewHolder(StepAdapter.StepViewHolder holder, int position) %7B%0A        holder.bind(position);%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        if (null == mSteps) return 0;%0A        return mSteps.length;%0A    %7D%0A%0A    public class StepViewHolder extends RecyclerView.ViewHolder %7B%0A%0A        private final TextView id;%0A        private final TextView description;%0A%0A        public StepViewHolder(View itemView) %7B%0A            super(itemView);%0A%0A            id = (TextView) itemView.findViewById(R.id.step_id);%0A            description = (TextView) itemView.findViewById(R.id.step_description);%0A        %7D%0A%0A        void bind(int position) %7B%0A            Step step = mSteps%5Bposition%5D;%0A            id.setText(String.valueOf(step.id));%0A            description.setText(step.description);%0A        %7D%0A    %7D%0A%0A    public void swapSteps(Step%5B%5D steps) %7B%0A        mSteps = steps;%0A        notifyDataSetChanged();%0A    %7D%0A%7D%0A

Add StepAdapter