package fr.utc.assos.uvweb.adapters;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import fr.utc.assos.uvweb.R;
import fr.utc.assos.uvweb.ThreadPreconditions;
import fr.utc.assos.uvweb.data.UVwebContent;
import fr.utc.assos.uvweb.holders.UVwebHolder;

import java.util.Collections;
import java.util.List;

/**
 * An adapter used all together with the {@link fr.utc.assos.uvweb.UVDetailFragment}'s ListView.
 * It relies on a standard ViewHolder pattern implemented in the {@link fr.utc.assos.uvweb.holders.UVwebHolder} class and thus allows UVs recycling.
 * It is used to show the users' comments of a given UV
 */
public class UVCommentAdapter extends UVAdapter {
	private List<UVwebContent.UVComment> mComments = Collections.emptyList();

	public UVCommentAdapter(Context context) {
		super(context);
	}

	@Override
	public int getCount() {
		return mComments.size();
	}

	@Override
	public UVwebContent.UVComment getItem(int position) {
		return mComments.get(position);
	}

	public void updateComments(List<UVwebContent.UVComment> comments) {
		ThreadPreconditions.checkOnMainThread();

		mComments = comments;
		notifyDataSetChanged();
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = mLayoutInflater.inflate(R.layout.uvcomment, null);
		}

		TextView userIdView = UVwebHolder.get(convertView, R.id.userid);
		TextView rateView = UVwebHolder.get(convertView, R.id.rate);
		TextView commentView = UVwebHolder.get(convertView, R.id.comment);
		TextView dateView = (TextView) convertView.findViewById(R.id.date);

		final UVwebContent.UVComment comment = getItem(position);

		userIdView.setText(comment.getAuthor());
		rateView.setText(comment.getFormattedRate());
		commentView.setText(comment.getComment());
		dateView.setText(comment.getFormattedDate());

		return convertView;
	}
}

@@ -1403,16 +1403,22 @@
 %0A%09%09%7D%0A%0A%09%09
+final 
 TextView
@@ -1472,24 +1472,30 @@
 .userid);%0A%09%09
+final 
 TextView rat
@@ -1541,24 +1541,30 @@
 id.rate);%0A%09%09
+final 
 TextView com
@@ -1620,16 +1620,22 @@
 ent);%0A%09%09
+final 
 TextView

Add final modifiers