I am building android application where I am using chat model. There is a WebSite Name as QuickBlox where all server side part is handle by them. I am using it for my application.They provide some sample Android code too, I have import the sample code and add all the lib and jar that need to run that project.
Now the problem is in one of my class there is a error of "It is indirectly referenced from required .class files" What dose it mean and how to solve this can any one help me in solving this issue.
Below is my class code -
public class UsersAdapter extends BaseAdapter {
private List<QBUser> dataSource;
private LayoutInflater inflater;
private List<QBUser> selected = new ArrayList<QBUser>();
public UsersAdapter(List<QBUser> dataSource, Context ctx) {
this.dataSource = dataSource;
this.inflater = LayoutInflater.from(ctx);
}
public List<QBUser> getSelected() {
return selected;
}
@Override
public int getCount() {
return dataSource.size();
}
@Override
public Object getItem(int position) {
return dataSource.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
convertView = inflater.inflate(R.layout.list_item_user, null);
holder = new ViewHolder();
holder.login = (TextView) convertView.findViewById(R.id.userLogin);
holder.add = (CheckBox) convertView.findViewById(R.id.addCheckBox);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final QBUser user = dataSource.get(position);
if (user != null) {
holder.login.setText(user.getLogin());
holder.add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if ((((CheckBox) v).isChecked())) {
selected.add(user);
} else {
selected.remove(user);
}
}
});
holder.add.setChecked(selected.contains(user));
}
return convertView;
}
private static class ViewHolder {
TextView login;
CheckBox add;
}
}
This is Documentation code for Android - [http://quickblox.com/developers/Android][1]