if (v == null) {
v = ((LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.mainlist, null);
a = (TextView) v.findViewById(R.id.a);
b = (TextView) v.findViewById(R.id.b);
c = (TextView) v.findViewById(R.id.c);
d = (TextView) v.findViewById(R.id.d);
e = (TextView) v.findViewById(R.id.e);
}
getView() 부분에서
a = (TextView) v.findViewById(R.id.a);
b = (TextView) v.findViewById(R.id.b);
c = (TextView) v.findViewById(R.id.c);
d = (TextView) v.findViewById(R.id.d);
e = (TextView) v.findViewById(R.id.e);
이 변수들을 다 if문 바깥으로 빼야 합니다.
findViewById를 한번만 하고싶다면 ViewHolder등의 형태로 구현해서 tag를 get,set해서 사용하셔야 합니다.
ViewHolder는 찾아보시면 예제가 많이 나오니 한번 찾아보세요~