Android Open Source - ExpandableListDemoApp Category






From Project

Back to project page ExpandableListDemoApp.

License

The source code is released under:

MIT License

If you think the Android project ExpandableListDemoApp 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

package de.frost.david.android.model;
// ww w  .  j a  v a2 s .  c  om
import java.util.ArrayList;
import java.util.List;

/**
 * ExpandableListDemoApp
 * <p/>
 * Created by david on 18.11.14.
 */
public class Category {
    String name;
    String[] products;
    List<SubCategory> list;


    public Category(String name) {
        this.name = name;
        list = new ArrayList<SubCategory>();
    }

    public Category(String name, String[] products) {
        this(name);
        this.products = products;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void addSub(SubCategory sub) {
        list.add(sub);
    }

    public SubCategory getSub(int pos) {
        return list.get(pos);
    }

    public boolean hasSub() {
        return (list.size() > 0);
    }

    public List<SubCategory> subs() {
        return list;
    }

    public String[] getProducts() {
        return products;
    }
}




Java Source Code List

de.frost.david.android.ApplicationTest.java
de.frost.david.android.MyActivity.java
de.frost.david.android.adapters.DrawerExpandableAdapter.java
de.frost.david.android.fragments.ItemListFragmentFragment.java
de.frost.david.android.fragments.NavigationDrawerFragment.java
de.frost.david.android.model.Category.java
de.frost.david.android.model.SubCategory.java