How to add image of a Parseuser Arraylist to a ParseObject Adapter

1

Well, I'm trying to add a user image in my Listview to when I publish an item it puche the user image of Parse in Imageview , but I can not ArrayAdapter of Fragment where is the Listview is of ParseObject , and the image of ParseUser .

Follow Adapter where I need to list the images

package com.parse.starter.adapter;

public class OfertasAdapter extends ArrayAdapter {
    private Context context;
    private ArrayList publicacoes;
    private ArrayList recuperaDescricao;
    private ArrayList recuperaPrecoAtual;
    private ArrayList recuperaPrecoAntigo;

    public OfertasAdapter(Context c, ArrayList objects) {
        super(c, 0, objects);
        this.context = c;
        this.publicacoes = objects;
        this.recuperaDescricao = objects;
        this.recuperaPrecoAtual = objects;
        this.recuperaPrecoAntigo = objects;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = convertView;

        if (view == null) {

            //Inicializa objeto para montagem do layout
            LayoutInflater inflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);

            //Monta a view a partir do xml
            view = inflater.inflate(R.layout.lista_publicacoes, parent, false);
        }
            //Verifica se existe postagens
            if (publicacoes.size() > 0) {

                //Recupera componentes da tela
                ImageView imagemPostagem = (ImageView) view.findViewById(R.id.image_lista_publicacoes);
                TextView descricao = (TextView) view.findViewById(R.id.descricaoId);
                TextView precoAtual = (TextView) view.findViewById(R.id.precoAtualId);
                TextView precoAntigo = (TextView) view.findViewById(R.id.precoAntigoId);

                ParseObject parseObject = publicacoes.get(position);
                ParseObject parseObject1 = recuperaDescricao.get(position);
                ParseObject parseObject2 = recuperaPrecoAtual.get(position);
                ParseObject parseObject3 = recuperaPrecoAntigo.get(position);

                Picasso.with(context)
                .load( parseObject.getParseFile( "imagem" ).getUrl() )
                .fit()
                .into( imagemPostagem );

                /**Exibe o texto do Parse no Textview!!!*/

                descricao.setText(parseObject1.get("Nome").toString());

                precoAtual.setText(parseObject2.getString("precoatual"));

                precoAntigo.setText(parseObject3.getString("precoAntigo"));


            }


            return view;
        }

}

I need to put the images from Parseuser to Picasso but as I said this Adapter only works with ParseObjects . Anything else I need to clarify the question let me know, hug.

    
asked by anonymous 23.01.2017 / 22:48

0 answers