if(position % 4 == 0)
{
topic_lay.setVisibility(View.VISIBLE);
}
else
{
topic_lay.setVisibility(View.GONE);
}
This is a code to make visible view in particular position but I want after 4th item in a list view should be visible.(as position starts from 0 which is conflict I want to add a view after 0,1,2,3-view-4,5,6,7-view-8,9,10,11-view- So on)
if((position+1) % 4 == 0)
{
topic_lay.setVisibility(View.VISIBLE);
}
else
{
topic_lay.setVisibility(View.GONE);
}