public class ButtonAdapter
extends BaseAdapter
Modifier and Type | Field and Description |
---|---|
protected ButtonClickListener |
clickHandler |
protected java.util.ArrayList<Relai> |
content |
protected Context |
mContext |
static java.lang.String |
TAG |
Constructor and Description |
---|
ButtonAdapter(Context c)
CTOR
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
clears the contents of the adapter
|
void |
fillData(ButtonClickListener clickHandler)
fillData
extract from the preferences wich relais have changed labels,
create a relai object and store the whole in a list
|
int |
getCount()
getCount
Total number of Relai's contained within the adapter
|
java.lang.Object |
getItem(int position)
getItem
returns the relai at the given position
|
long |
getItemId(int position)
getItemId
Require for structure, not really used in my code.
|
View |
getView(int position,
View convertView,
ViewGroup parent)
getView
extracts relai-info at the given position,
if the button exists reuses it, otherwise creates one,
initializes it with the relai-data, and returns it
|
protected Context mContext
protected ButtonClickListener clickHandler
protected java.util.ArrayList<Relai> content
public static final java.lang.String TAG
public void fillData(ButtonClickListener clickHandler)
Relai
public int getCount()
public java.lang.Object getItem(int position)
public long getItemId(int position)
public View getView(int position, View convertView, ViewGroup parent)
public void clear()