java.lang.Object | |||
↳ | android.widget.BaseAdapter | ||
↳ | android.widget.ArrayAdapter<T> | ||
↳ | com.pdftron.pdf.utils.ColorPickerGridViewAdapter |
An array adapter for showing colors.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | TYPE_ADD_COLOR | Color type add new color. | |||||||||
String | TYPE_REMOVE_COLOR | Color type remove color | |||||||||
String | TYPE_RESTORE_COLOR | Color type restore color | |||||||||
String | TYPE_TRANSPARENT | Color type transparent color |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.widget.Adapter
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ColorPickerGridViewAdapter(Context context, List<String> list) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
add(String object)
Adds a color item.
| ||||||||||
void |
addAll(Collection<? extends String> collection)
Adds all items to color source list
| ||||||||||
void |
addFront(String object)
Adds a color item to the front of the color source list.
| ||||||||||
void |
addItem(int position, String value)
Add source value to specified position
| ||||||||||
void |
addSelected(int position)
Add given position color source item to selected list
| ||||||||||
boolean |
contains(String item)
Whether the color source contains the given color item
| ||||||||||
void |
deleteAllSelected()
Deletes selected list items from color source
| ||||||||||
int |
getCount()
Gets color source count.
| ||||||||||
String |
getFirstSelectedInList()
Gets first selected list item
| ||||||||||
String |
getItem(int position)
Get color item in list at specific position.
| ||||||||||
Pair<Boolean, Integer> |
getItemIndex(int colorInt)
Gets the index of the color item.
| ||||||||||
Pair<Boolean, Integer> |
getItemIndex(String item)
Gets the index of the color item.
| ||||||||||
List<String> |
getItems()
Gets all color source items
| ||||||||||
String |
getSelected()
Gets selected color source
| ||||||||||
ArrayList<String> |
getSelectedList()
Gets selected list
| ||||||||||
int |
getSelectedListCount()
Gets selected list count
| ||||||||||
View | getView(int position, View convertView, ViewGroup parent) | ||||||||||
boolean |
isEditing()
Gets whether the color source is editing
| ||||||||||
boolean |
isInSelectedList(int position)
Whether the specified position in color source is in selected list
| ||||||||||
boolean |
isItemDisabled(String item)
Whether the specified color item is disabled
| ||||||||||
void |
removeAllSelected()
Clears selected list
| ||||||||||
int |
removeItem(String value)
Remove Item from color source
| ||||||||||
void |
removeItem(int position)
Removes item at specific position
| ||||||||||
void |
removeSelected(int position)
Remove the specific position color source item from selected list
| ||||||||||
void |
setCellBackground(int resId)
Sets color cell background
| ||||||||||
void |
setCellSize(int width, int height)
Sets cell size for color item
| ||||||||||
void |
setDisabledColorList(ArrayList<String> disabledColorList)
Sets disabled list of color items.
| ||||||||||
void |
setEditing(boolean editing)
Sets whether the color source is editing.
| ||||||||||
void |
setFavoriteList(ArrayList<String> favoriteList)
Sets favorite list of color items.
| ||||||||||
void |
setItem(int index, String item)
Sets color item in specific index
| ||||||||||
void |
setMaxSize(int size)
Sets the maximum size of holdable color sources.
| ||||||||||
void |
setSelected(String selected)
Sets the given color source to be selected
| ||||||||||
void |
setSelected(int position)
Sets whether the specific position color is selected
| ||||||||||
void |
setSelectedList(ArrayList<String> selectedList)
Sets selected list of color items.
| ||||||||||
void |
setSource(List<String> list)
Sets color list source
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.widget.ArrayAdapter
| |||||||||||
From class
android.widget.BaseAdapter
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.widget.Adapter
| |||||||||||
From interface
android.widget.Filterable
| |||||||||||
From interface
android.widget.ListAdapter
| |||||||||||
From interface
android.widget.SpinnerAdapter
| |||||||||||
From interface
android.widget.ThemedSpinnerAdapter
|
Color type add new color.
Color type remove color
Color type restore color
Color type transparent color
context | The context |
---|---|
list | the color list |
Adds a color item. If color source exceeds maximum size, then it removes the first color item.
object | The color item |
---|
Adds all items to color source list
collection | The collection of color items |
---|
Adds a color item to the front of the color source list. If the color source exceeds maximum size, then it removes the color item at the end of the list.
object | The color item |
---|
Add source value to specified position
position | position |
---|---|
value | source value |
Add given position color source item to selected list
position | The position in color source |
---|
Whether the color source contains the given color item
item | The color item |
---|
Deletes selected list items from color source
Gets color source count.
Gets first selected list item
Get color item in list at specific position.
position | The specific position. |
---|
Gets the index of the color item.
colorInt | The color item |
---|
Gets the index of the color item.
item | The color item in string format |
---|
Gets all color source items
Gets selected color source
Gets selected list
Gets selected list count
Gets whether the color source is editing
Whether the specified position in color source is in selected list
position | The position in color source |
---|
Whether the specified color item is disabled
item | The color item |
---|
Clears selected list
Remove Item from color source
value | color value that is going to be removed |
---|
Removes item at specific position
position | The specific position |
---|
Remove the specific position color source item from selected list
position | The position of selected list |
---|
Sets color cell background
resId | The background resource id |
---|
Sets cell size for color item
width | Cell width |
---|---|
height | Cell height |
Sets disabled list of color items. If a color source item is in disabled list, it will show a half transparent star icon in middle
disabledColorList | a list of disabled color items |
---|
Sets whether the color source is editing.
If the color source is editing, show item TYPE_REMOVE_COLOR
, else hide it.
editing | whether the color source is editing |
---|
Sets favorite list of color items. If a color source item is in favorite list, it will show a star icon in middle
favoriteList | a list of favorite color items |
---|
Sets color item in specific index
index | The specific index |
---|---|
item | The color item in string format |
Sets the maximum size of holdable color sources.
size | Maximum size |
---|
Sets the given color source to be selected
selected | The selected color source |
---|
Sets whether the specific position color is selected
position | The specific position |
---|
Sets selected list of color items. If a color source item is in selected list, it will show a white check mark icon in middle
selectedList | a list of selected color items |
---|
Sets color list source
list | color list source |
---|