title: view is repeating multiple times in listview
body: <p>hi guys i am getting multi texts in the list view in the navigation drawer where i want that text for only one time and below the simple plain thobes in the men category but i am getting below every text in the listview</p>
  
  <p>Navgation_adapter.class</p>
  
  <pre><code>public class Navgation_adapter extends BaseAdapter {
      private Context context;
      private List&lt;Data&gt; catdata;
      private LayoutInflater inflater;
  
      public Navgation_adapter(Context context, List&lt;Data&gt; catdata) {
          this.context = context;
          this.catdata = catdata;
      }
  
      @Override
      public int getCount() {
          return catdata.size();
      }
  
      @Override
      public Object getItem(int i) {
          return catdata.get(i);
      }
  
      @Override
      public long getItemId(int i) {
          return i;
      }
  
      @Override
      public View getView(int i, View view, ViewGroup viewGroup) {
  
          ViewHolder holder;
          if (inflater == null)
              inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          if (view == null) {
              holder = new ViewHolder();
              view = inflater.inflate(R.layout.navigation_list, viewGroup, false);
              holder.categories = (TextView) view.findViewById(R.id.categories);
              holder.subcategories = (TextView) view.findViewById(R.id.subcategories);
              holder.whole = (TextView) view.findViewById(R.id.whole);
              holder.catline=view.findViewById(R.id.catline);
              holder.catline2=view.findViewById(R.id.catline2);
              view.setTag(holder);
  
          } else {
              holder = (ViewHolder) view.getTag();
          }
          Data ndata = catdata.get(i);
          if (ndata.getCatergory() == null) {
              holder.categories.setText(ndata.getCatergory());
              holder.subcategories.setText(ndata.getSubcatergory());
              holder.categories.setVisibility(View.GONE);
              holder.catline.setVisibility(View.GONE);
              holder.catline2.setVisibility(View.VISIBLE);
              holder.subcategories.setVisibility(View.VISIBLE);
              holder.whole.setVisibility(View.GONE);
              holder.whole.setVisibility(View.VISIBLE);
          } else {
              holder.categories.setText(ndata.getCatergory());
              holder.subcategories.setText(ndata.getSubcatergory());
              holder.categories.setVisibility(View.VISIBLE);
              holder.catline.setVisibility(View.VISIBLE);
              holder.catline2.setVisibility(View.GONE);
              holder.subcategories.setVisibility(View.GONE);
              holder.whole.setVisibility(View.GONE);
          }
  
          return view;
      }
  
      static class ViewHolder {
          TextView categories, subcategories,whole;
          View catline,catline2;
      }
  }[![Image of Navigation drawer][1]][1]
  </code></pre>