vendredi 12 juin 2015

Check if Query in sqlite is empty in a bindView method

Please is it possible to check if data queried from android sqlite database is empty in a bindView method? If yes kindly direct me on that.

This is what I have done so far, but I think I am doing the wrong thing.

    @Override
    public void bindView(View view, Context context, Cursor myCur) {
        TextView firstLine=(TextView)view.findViewById(R.id.firstLine);

        if(myCur==null){
                String message="No Message";
                firstLine.setText(message);
        }
    }

Thanks for helping.

Aucun commentaire:

Enregistrer un commentaire