Android Open Source - HistoryCleanerPro Category

From Project

Back to project page HistoryCleanerPro.


The source code is released under:

Copyright (c) 2014, John Phillips All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...

If you think the Android project HistoryCleanerPro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from  www  . ja  va 2 s.  co  m*/
import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ayros.historycleaner.R;

public class Category
  private String name;
  private List<CleanItem> items = new ArrayList<CleanItem>();
  private ViewGroup titleView = null;
  public Category(String name)
  { = name;
  public String getName()
    return name;
  public List<CleanItem> getItems()
    return items;
  public void addItem(CleanItem item)
  public View getCategoryView(Context c)
    titleView = (ViewGroup)View.inflate(c, R.layout.category_heading, null);

    TextView tv = (TextView)titleView.findViewById(;
    tv.setText(getName() + " (" + getItems().size() + ")");
    for (int i = 0; i < items.size(); i++)
      titleView.addView(items.get(i).getItemView(c, i != items.size() - 1));
    return titleView;

Java Source Code List