public abstract class ChipViewAdapter
extends java.util.Observable
| Constructor and Description |
|---|
ChipViewAdapter(android.content.Context context) |
ChipViewAdapter(android.content.Context context,
android.util.AttributeSet attributeSet) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Chip chip)
Wrapper to add a Chip
|
int |
count()
How many Chip do we have
|
android.util.AttributeSet |
getAttributeSet() |
abstract int |
getBackgroundColor(int position)
Return the Chip background color
Override it if you want to have different logic depending of Chip
|
abstract int |
getBackgroundColorSelected(int position)
Return the Chip color for selected state
Override it if you want to have different logic depending of Chip
|
abstract int |
getBackgroundRes(int position)
Return the Chip background res id
Override it if you want to have different logic depending of Chip
|
Chip |
getChip(int position) |
int |
getChipBackgroundColor() |
int |
getChipBackgroundColorSelected() |
int |
getChipCornerRadius() |
int |
getChipLayoutRes() |
java.util.List<Chip> |
getChipList() |
int |
getChipPadding() |
int |
getChipSidePadding() |
int |
getChipSpacing() |
int |
getChipTextSize() |
protected int |
getColor(int colorRes) |
android.content.Context |
getContext() |
abstract int |
getLayoutRes(int position)
Return the Chip layout res id
Override it if you want to have different logic depending of Chip
|
int |
getLineSpacing() |
android.view.View |
getView(android.view.ViewGroup parent,
int position) |
boolean |
hasBackground() |
boolean |
isToleratingDuplicate() |
abstract void |
onLayout(android.view.View view,
int position)
Have a chance to modify the Chip layout
|
void |
remove(Chip chip)
Wrapper to remove a Chip
|
void |
setAttributeSet(android.util.AttributeSet attributeSet) |
void |
setChipBackgroundColor(int chipBackgroundColor) |
void |
setChipBackgroundColorSelected(int chipBackgroundColorSelected) |
void |
setChipBackgroundRes(int backgroundRes)
Set overall Chip background color by res id
Can be fine tuned by overriding @see com.scanners.android.bao.view.ChipTextView.Chip#getBackgroundRes
|
void |
setChipCornerRadius(int chipCornerRadius) |
void |
setChipLayoutRes(int chipRes)
Set overall Chip layout by res id
Can be fine tuned by overriding @see com.scanners.android.bao.view.ChipTextView.Chip#getLayoutRes
|
void |
setChipList(java.util.List<Chip> chipList) |
void |
setChipPadding(int chipPadding) |
void |
setChipSidePadding(int chipSidePadding) |
void |
setChipSpacing(int chipSpacing) |
void |
setChipTextSize(int chipTextSize) |
void |
setHasBackground(boolean hasBackground) |
void |
setLineSpacing(int lineSpacing) |
void |
setToleratingDuplicate(boolean toleratingDuplicate)
Set whether or not ChipTextView tolerate duplicate Chip
|
public ChipViewAdapter(android.content.Context context)
public ChipViewAdapter(android.content.Context context,
android.util.AttributeSet attributeSet)
public abstract int getLayoutRes(int position)
public abstract int getBackgroundRes(int position)
public abstract int getBackgroundColor(int position)
public abstract int getBackgroundColorSelected(int position)
public abstract void onLayout(android.view.View view,
int position)
public android.view.View getView(android.view.ViewGroup parent,
int position)
public Chip getChip(int position)
public void add(Chip chip)
chip - public void remove(Chip chip)
chip - public int count()
protected int getColor(@ColorRes
int colorRes)
public android.content.Context getContext()
public android.util.AttributeSet getAttributeSet()
public void setAttributeSet(android.util.AttributeSet attributeSet)
public java.util.List<Chip> getChipList()
public void setChipList(java.util.List<Chip> chipList)
public boolean isToleratingDuplicate()
public void setToleratingDuplicate(boolean toleratingDuplicate)
toleratingDuplicate - public boolean hasBackground()
public void setHasBackground(boolean hasBackground)
public int getChipSpacing()
public void setChipSpacing(int chipSpacing)
public int getLineSpacing()
public void setLineSpacing(int lineSpacing)
public int getChipPadding()
public void setChipPadding(int chipPadding)
public int getChipSidePadding()
public void setChipSidePadding(int chipSidePadding)
public int getChipCornerRadius()
public void setChipCornerRadius(int chipCornerRadius)
public int getChipBackgroundColor()
public void setChipBackgroundColor(int chipBackgroundColor)
public int getChipBackgroundColorSelected()
public void setChipBackgroundColorSelected(int chipBackgroundColorSelected)
public int getChipTextSize()
public void setChipTextSize(int chipTextSize)
public void setChipBackgroundRes(@DrawableRes
int backgroundRes)
backgroundRes - public int getChipLayoutRes()
public void setChipLayoutRes(@LayoutRes
int chipRes)