Post Reply

Insert "}" to complete classbody

OP csj0530

30th May 2014, 07:36 AM   |  #1  
OP Member
Flag Daejeon
Thanks Meter: 12
 
32 posts
Join Date:Joined: Aug 2012
More
Code:
import java.util.ArrayList;
import java.util.List;
 
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
 
public class RSSListAdapter extends BaseAdapter {
 
    private Context mContext;
 
    private List<rssnewsitem> mItems = new ArrayList<rssnewsitem>();
 
    public RSSListAdapter(Context context) {
        mContext = context;
    }
 
    public void addItem(RSSNewsItem it) {
        mItems.add(it);
    }
 
    public void setListItems(List<rssnewsitem> lit) {
        mItems = lit;
    }
 
    public int getCount() {
        return mItems.size();
    }
 
    public Object getItem(int position) {
        return mItems.get(position);
    }
 
    public boolean areAllItemsSelectable() {
        return false;
    }
 
    public boolean isSelectable(int position) {
        return true;
    }
 
    public long getItemId(int position) {
        return position;
    }
 
    public View getView(int position, View convertView, ViewGroup parent) {
        RSSNewsItemView itemView;
        if (convertView == null) {
            itemView = new RSSNewsItemView(mContext, mItems.get(position));
        } else {
            itemView = (RSSNewsItemView) convertView;
             
            itemView.setIcon(mItems.get(position).getIcon());
            itemView.setText(0, mItems.get(position).getTitle());
            itemView.setText(1, mItems.get(position).getPubDate());
            itemView.setText(2, mItems.get(position).getCategory());
            itemView.setText(3, mItems.get(position).getDescription());
        }
 
        return itemView;
    }
 
}
</rssnewsitem></rssnewsitem></rssnewsitem>
Error :
1. rssnewsitem cannot be resolved to a type.
2. insert "}" to complete classbody.{the red one on code}

I am practicing parsing with android and these sources are available on here.

However, eclipse is outputing error like above.

If I change rssnewsitem to RSSNewsItem, error 1 disappears.
However I could not understand even if I use "Clean" option or insert }, the error doesn't disappear.
} problem are also available on here.

Thank you.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Q&A, Help & Troubleshooting by ThreadRank