mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add mInflator, rearrange class vars in CategoriesAdapter
This commit is contained in:
parent
3990981710
commit
a34d1217c3
1 changed files with 8 additions and 5 deletions
|
|
@ -15,18 +15,21 @@ import java.util.TreeSet;
|
|||
import fr.free.nrw.commons.R;
|
||||
|
||||
public class CategoriesAdapter extends BaseAdapter {
|
||||
private Context context;
|
||||
private ArrayList<CategorizationFragment.CategoryItem> items;
|
||||
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
private static final int TYPE_ITEM = 0;
|
||||
private static final int TYPE_SEPARATOR = 1;
|
||||
|
||||
private Context context;
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
//FIXME: Might have issue here, headers need to be a String type so you can't just add them to an ArrayList of CategoryItem
|
||||
private ArrayList<CategorizationFragment.CategoryItem> items;
|
||||
|
||||
private TreeSet<Integer> sectionHeader = new TreeSet<Integer>();
|
||||
|
||||
public CategoriesAdapter(Context context, ArrayList<CategorizationFragment.CategoryItem> items) {
|
||||
this.context = context;
|
||||
this.items = items;
|
||||
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue