0
I’m trying to do a mathematical operation by taking a number of Child in the firebase, more often than not the error of converting string...
the getCounter
this as String
no model , more when I change it to int,long or Double it gives the error that you can’t convert string...
Thank you in advance.
@Override
public void onBindViewHolder(final MyViewHolder holder, final int position)
{
final Blog blog = mQuestionList.get(position);
int conta01 = Integer.parseInt(blog.getCounter());
int conta02 = 5;
int resultado = conta01-conta02;
holder.new_post.setText(resultado);
android.content.res.Resources$Notfoundexception: String Resource ID #0xfffffffd at android.content.res.resources.gettext(Resources.java:327) at android.widget.Textview.setText(Textview.java:4663) with.robertoc.meublogclash.AdapterRecyclerView.Recyclerviewamigos.onBindViewHolder(Recyclerviewamigos.java:97) with.robertoc.meublogclash.AdapterRecyclerView.Recyclerviewamigos.onBindViewHolder(Recyclerviewamigos.java:32) at android.support.v7.widget.Recyclerview$Adapter.onBindViewHolder(Recyclerview.java:6356) at android.support.v7.widget.Recyclerview$Adapter.bindViewHolder(Recyclerview.java:6389) at android.support.v7.widget.Recyclerview$Recycler.tryBindViewHolderByDeadline(Recyclerview.java:5335) at android.support.v7.widget.Recyclerview$Recycler.tryGetViewHolderForPositionByDeadline(Recyclerview.java:5598) at android.support.v7.widget.Recyclerview$Recycler.getViewForPosition(Recyclerview.java:5440) at android.support.v7.widget.Recyclerview$Recycler.getViewForPosition(Recyclerview.java:5436) at android.support.v7.widget.Linearlayoutmanager$Layoutstate.next(Linearlayoutmanager.java:2224) at android.support.v7.widget.Linearlayoutmanager.layoutChunk(Linearlayoutmanager.java:1551) at android.support.v7.widget.Linearlayoutmanager.Fill(Linearlayoutmanager.java:1511)
valeu worked!
– Wallace Roberto