Application closing by itself after holder.textViewVar.setVisibility

0

I have RecyclerView and in each item I would like to check if a fact occurred to show a button:

@Override
public void onBindViewHolder(ViewHolder holder, int position) {

    Posts post = Posts.get(position);
    holder.post = post;

    //Loading image from url
    imageLoader = CustomVolleyRequest.getInstance(context).getImageLoader();

    //parte nova que trava (essas 7 linhas):
    String lk = post.getLk();
    if (lk.equals("1")) { //show button
        holder.textViewUnlk.setVisibility(View.VISIBLE);
    } else { //hide
        holder.textViewLk.setVisibility(View.VISIBLE);
    }



    holder.textViewName.setText(post.getName());

    holder.textViewPublisher.setText(post.getPublisher());
    holder.setIsRecyclable(false);
}

The textViewLk and textViewUnlk are in XML as GONE . What can it be?

    
asked by anonymous 27.02.2017 / 15:33

0 answers