I'm using listview
and populating it with cursoradapter
. Scrolling up and down the lines disappear. If I start with 30 elements, as I scroll up and down I get less ... until I get more or less number of lines without scrolling.
My adapter is as follows:
public class AdapterChatDetail extends CursorAdapter {
private Context mContext;
private int id;
private Cursor mCursor;
public AdapterChatDetail(Context context, Cursor c)
{
super(context, c, 0);
mContext = context;
mCursor = c;
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
return LayoutInflater.from(context).inflate(R.layout.linha_chatdetail, parent, false);
}
@Override
public void bindView(View mView, Context context, Cursor cursor) {
((TextView) mView.findViewById(R.id.msg1)).setText(cursor.getString(cursor.getColumnIndex(Contrato.Chat.COLUMN_MSG)));
}
}
And the list is defined this way
<ListView
android:id="@+id/lista"
android:layout_below="@id/scroll"
android:layout_above="@id/linha2"
android:dividerHeight="0dp"
android:divider="@null"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
Any idea what might be going on?
Thank you