Reputation: 81
Trying to change all my calls from findBybyID to use AndroidX view binding, which for regular code, worked really well and was quite simple to do. However having real problems trying to get it working with a RecyclerView.
My ViewHolder looks like this:
private class ViewHolder extends RecyclerView.ViewHolder
{
SearchlistitemBinding binding;
public ViewHolder( SearchlistitemBinding b )
{
super( b.getRoot() );
binding = b;
}
public String getTitle()
{
return binding.stationname.getText().toString();
}
public void setTitle( String title )
{
binding.stationname.setText( title);
}
public String getDescription()
{
return binding.stationname.getText().toString();
}
public void setDescription( String description )
{
binding.stationdescription.setText( description);
}
}
However I can't see to get this to work my arrayadapter getView override. Anyone got any hints and tips? Thanks.
Upvotes: 0
Views: 167