@@ -0,0 +1,2689 @@
+package org.apache.taverna.mobile.ui.adapter;%0A%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.util.Log;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.ProgressBar;%0Aimport android.widget.TextView;%0A%0Aimport org.apache.taverna.mobile.R;%0Aimport org.apache.taverna.mobile.data.model.Announcements;%0A%0A%0Aimport java.util.List;%0A%0Aimport butterknife.BindView;%0Aimport butterknife.ButterKnife;%0A%0Apublic class AnnouncementAdapter extends RecyclerView.Adapter%3CRecyclerView.ViewHolder%3E %7B%0A%0A    private List%3CAnnouncements.Announcement%3E mAnnouncementList;%0A    private final int VIEW_ITEM = 1;%0A    private final int VIEW_PROG = 0;%0A%0A%0A    public AnnouncementAdapter( List%3CAnnouncements.Announcement%3E announcementList) %7B%0A        mAnnouncementList = announcementList;%0A    %7D%0A%0A    public void setAnnouncementList(List%3CAnnouncements.Announcement%3E announcementList) %7B%0A        mAnnouncementList = announcementList;%0A    %7D%0A%0A    public static class ProgressViewHolder extends RecyclerView.ViewHolder %7B%0A        public ProgressBar progressBar;%0A        public ProgressViewHolder(View v) %7B%0A            super(v);%0A            progressBar = (ProgressBar)v.findViewById(R.id.progressBar1);%0A        %7D%0A    %7D%0A%0A%0A    @Override%0A    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) %7B%0A        RecyclerView.ViewHolder vh;%0A        if (viewType == VIEW_ITEM) %7B%0A            View v = LayoutInflater.from(parent.getContext()).inflate(%0A                    R.layout.item_recyclerview, parent, false);%0A%0A            vh = new ViewHolder(v);%0A        %7D else %7B%0A            View v = LayoutInflater.from(parent.getContext()).inflate(%0A                    R.layout.item_progressbar, parent, false);%0A%0A            vh = new ProgressViewHolder(v);%0A        %7D%0A        return vh;%0A    %7D%0A%0A    @Override%0A    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) %7B%0A        if(holder instanceof ViewHolder) %7B%0A            ((ViewHolder) holder).tvAnnouncementTitle.setText(mAnnouncementList.get(position).getContent());%0A            Log.e(%22%22, %22onBindViewHolder: %22+mAnnouncementList.get(1).getContent());%0A        %7D%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        return mAnnouncementList.size();%0A    %7D%0A%0A    @Override%0A    public int getItemViewType(int position) %7B%0A        return mAnnouncementList.get(position)!=null? VIEW_ITEM: VIEW_PROG;%0A    %7D%0A%0A%0A    class ViewHolder extends RecyclerView.ViewHolder %7B%0A%0A        @BindView(R.id.textview_announcement)%0A        TextView tvAnnouncementTitle;%0A%0A        public ViewHolder(View itemView) %7B%0A            super(itemView);%0A            ButterKnife.bind(this, itemView);%0A        %7D%0A    %7D%0A%7D

add announcement recycler view adapter