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.
package com.ayros.historycleaner.cleaning; /*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) { this.name = name; } public String getName() { return name; } public List<CleanItem> getItems() { return items; } public void addItem(CleanItem item) { items.add(item); } public View getCategoryView(Context c) { titleView = (ViewGroup)View.inflate(c, R.layout.category_heading, null); TextView tv = (TextView)titleView.findViewById(R.id.category_name); 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; } }