com.samsung.android.sdk.look.airbutton
Class SlookAirButtonAdapter
- java.lang.Object
-
- com.samsung.android.sdk.look.airbutton.SlookAirButtonAdapter
-
- Direct Known Subclasses:
- SlookAirButtonFrequentContactAdapter, SlookAirButtonRecentMediaAdapter
public class SlookAirButtonAdapter extends java.lang.Object
SlookAirButtonAdapter is Adapter for using SlookAirButton class. It is medium between AirButton and Item.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
SlookAirButtonAdapter.AirButtonItem
Data container class.
-
Constructor Summary
Constructors Constructor and Description SlookAirButtonAdapter()
Default constructor.SlookAirButtonAdapter(java.util.ArrayList<SlookAirButtonAdapter.AirButtonItem> itemList)
Constructor which user can set item list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
addItem(java.util.ArrayList<SlookAirButtonAdapter.AirButtonItem> itemList)
Add item.void
addItem(SlookAirButtonAdapter.AirButtonItem item)
Add a item.void
clear()
Removes all items.int
getCount()
Get many items are in the data set represented by this Adapterjava.lang.CharSequence
getEmptyText()
Get Emptytext if this method is called.SlookAirButtonAdapter.AirButtonItem
getItem(int idx)
Get the item associated with the specified position.void
insertItem(int index, SlookAirButtonAdapter.AirButtonItem item)
Insert a item.void
onDismiss(android.view.View parentView)
When widget is dismissed, this method is called.void
onHide(android.view.View parentView)
When widget is hided this method called.boolean
onHoverEnter(android.view.View parentView)
When the pointer is entered the boundaries of parent view, this method is called.void
onHoverExit(android.view.View parentView)
When the pointer is exited the boundaries of parent view, this method is called.void
onShow(android.view.View parentView)
When widget is showed this method called.void
removeItem(int index)
Remove Item.void
setEmptyText(java.lang.CharSequence text)
Set emptytext, so that the airbutton can show toast popup when the list is empty.void
updateItem(int index, SlookAirButtonAdapter.AirButtonItem item)
Update Item.
-
-
-
Constructor Detail
-
SlookAirButtonAdapter
public SlookAirButtonAdapter()
Default constructor.- Since:
- 1.0.0
-
SlookAirButtonAdapter
public SlookAirButtonAdapter(java.util.ArrayList<SlookAirButtonAdapter.AirButtonItem> itemList)
Constructor which user can set item list.- Parameters:
itemList
- Item which you want to add in adapter.- Since:
- 1.0.0
-
-
Method Detail
-
addItem
public void addItem(SlookAirButtonAdapter.AirButtonItem item)
Add a item.- Parameters:
item
- Item which you want to add in adapter.- Since:
- 1.0.0
-
addItem
public int addItem(java.util.ArrayList<SlookAirButtonAdapter.AirButtonItem> itemList)
Add item.- Parameters:
itemList
- Item which you want to add in adapter.- Returns:
- Total item count - 1.
- Since:
- 1.0.0
-
insertItem
public void insertItem(int index, SlookAirButtonAdapter.AirButtonItem item)
Insert a item.- Parameters:
item
- Item which you want to add in adapter.index
- starting position in mItemList.- Since:
- 1.0.0
-
removeItem
public void removeItem(int index)
Remove Item.- Parameters:
index
- starting position in mItemList.- Since:
- 1.0.0
-
updateItem
public void updateItem(int index, SlookAirButtonAdapter.AirButtonItem item)
Update Item.- Parameters:
item
- Item which you want to add in adapter.index
- starting position in mItemList.- Since:
- 1.0.0
-
clear
public void clear()
Removes all items.- Since:
- 1.0.0
-
getCount
public int getCount()
Get many items are in the data set represented by this Adapter- Returns:
- Total item count.
- Since:
- 1.0.0
-
getItem
public SlookAirButtonAdapter.AirButtonItem getItem(int idx)
Get the item associated with the specified position.- Parameters:
idx
- Specific index of item which want to get.- Returns:
- Item instance of selected index.
- Since:
- 1.0.0
-
setEmptyText
public void setEmptyText(java.lang.CharSequence text)
Set emptytext, so that the airbutton can show toast popup when the list is empty.- Parameters:
text
- the text is for empty list.- Since:
- 1.0.0
-
getEmptyText
public java.lang.CharSequence getEmptyText()
Get Emptytext if this method is called.- Returns:
- mEmptyText the text is for empty.
- Since:
- 1.0.0
-
onHoverEnter
public boolean onHoverEnter(android.view.View parentView)
When the pointer is entered the boundaries of parent view, this method is called.- Parameters:
parentView
- The view that was hovered.- Returns:
- true Hover is entered.
- Since:
- 1.0.0
-
onHoverExit
public void onHoverExit(android.view.View parentView)
When the pointer is exited the boundaries of parent view, this method is called.- Parameters:
parentView
- The view that was hovered.- Since:
- 1.0.0
-
onShow
public void onShow(android.view.View parentView)
When widget is showed this method called. User can override this method and control some behavior of adapter with this situation. (ex. open Cursor).- Parameters:
parentView
- The view that was hover-button clicked.- Since:
- 1.0.0
-
onHide
public void onHide(android.view.View parentView)
When widget is hided this method called. User can override this method and control some behavior of adapter with this situation. (ex. close Cursor).- Parameters:
parentView
- The view that was hover-button clicked.- Since:
- 1.0.0
-
onDismiss
public void onDismiss(android.view.View parentView)
When widget is dismissed, this method is called. User can override this method and control some behavior of adapter with this situation. (ex. close Cursor).- Parameters:
parentView
- The view that was hover-button clicked.- Since:
- 1.0.0
-
-