public class

HtcListView

extends HtcAbsListView
implements GestureDetector.OnGestureListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.htc.widget.HtcAdapterView<T extends android.widget.Adapter>
         ↳ com.htc.widget.HtcAbsListView
           ↳ com.htc.widget.HtcListView

Class Overview

A view that shows items in a vertically scrolling list. The items come from the ListAdapter associated with this view.

See the List View tutorial.

Summary

Nested Classes
class HtcListView.FixedViewInfo A class that represents a fixed view in a list, for example a header at the top or a footer at the bottom. 
XML Attributes
Attribute Name Related Method Description
android:divider Drawable or color to draw between list items. 
android:dividerHeight Height of the divider. 
android:entries Reference to an array resource that will populate the ListView. 
android:footerDividersEnabled When set to false, the ListView will not draw the divider before each footer view. 
android:headerDividersEnabled When set to false, the ListView will not draw the divider after each header view. 
[Expand]
Inherited XML Attributes
From class com.htc.widget.HtcAbsListView
Constants
int DEFAULT_INTRO_ANIMATION Used to indicate the intro animation type
int DOWN_INTRO_ANIMATION
int LEFT_INTRO_ANIMATION
int RIGHT_INTRO_ANIMATION
int UP_INTRO_ANIMATION
[Expand]
Inherited Constants
From class com.htc.widget.HtcAbsListView
From class com.htc.widget.HtcAdapterView
From class android.view.ViewGroup
From class android.view.View
Fields
protected AnimatorSet mBoucingAnimatorSet
protected int mEmptyHeight
[Expand]
Inherited Fields
From class com.htc.widget.HtcAbsListView
From class android.view.ViewGroup
From class android.view.View
Public Constructors
HtcListView(Context context)
HtcListView(Context context, AttributeSet attrs)
HtcListView(Context context, AttributeSet attrs, int defStyle)
Public Methods
void addFootViewWithoutDivider(View v, Object data, boolean isSelectable)
Adds a fixed view to appear at the bottom of the list.
void addFooterView(View v, Object data, boolean isSelectable)
Adds a fixed view to appear at the bottom of the list.
void addFooterView(View v)
Adds a fixed view to appear at the bottom of the list.
void addHeaderView(View v, Object data, boolean isSelectable)
Adds a fixed view to appear at the top of the list.
void addHeaderView(View v)
Adds a fixed view to appear at the top of the list.
boolean dispatchKeyEvent(KeyEvent event)
boolean dispatchTouchEvent(MotionEvent ev)
void draw(Canvas canvas)
void enableAnimation(int anim_id, boolean enable)
Enables or disables one kind of animation; default : enable all animations HtcAbsListView.ANIM_OVERSCROLL, ANIM_INTRO, ANIM_CLICK, ANIM_ADD, ANIM_DEL; can use bit operation, e.g.: ANIM_OVERSCROLL & ANIM_INTRO
ListAdapter getAdapter()
Returns the adapter currently in use in this ListView.
long[] getCheckItemIds()
This method is deprecated. Use #getCheckedItemIds() instead.
Drawable getDivider()
Returns the drawable that will be drawn between each item in the list.
int getDividerHeight()
int getFooterViewsCount()
Returns the number of footer views in the list.
int getHeaderViewsCount()
Returns the number of header views in the list.
boolean getItemsCanFocus()
Drawable getListSelectorPressed()
int getMaxScrollAmount()
Drawable getOverscrollFooter()
Drawable getOverscrollHeader()
boolean isFootAdjusted()
boolean isOpaque()
boolean isOverListHeight()
boolean onDown(MotionEvent e)
boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
boolean onInterceptTouchEvent(MotionEvent event)
boolean onKeyDown(int keyCode, KeyEvent event)
boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)
boolean onKeyUp(int keyCode, KeyEvent event)
void onLongPress(MotionEvent e)
void onScroll(HtcAbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)
Callback method to be invoked when the list or grid has been scrolled.
boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
void onScrollStateChanged(HtcAbsListView view, int scrollState)
Callback method to be invoked while the list view or grid view is being scrolled.
void onShowPress(MotionEvent e)
boolean onSingleTapUp(MotionEvent e)
boolean onTouchEvent(MotionEvent ev)
void onWindowFocusChanged(boolean hasWindowFocus)
boolean performItemClick(View view, int position, long id)
boolean removeFooterView(View v)
Removes a previously-added footer view.
boolean removeHeaderView(View v)
Removes a previously-added header view.
boolean requestChildRectangleOnScreen(View child, Rect rect, boolean immediate)
void scrollToFirstAddedPosition(int pos)
void set2DPressAnimationEnabled(boolean enabled)
Enables or disables 2D Press Animation
void setActivatedPortrait(boolean b)
Enables activated background for item in portrait mode.
void setAdapter(ListAdapter adapter)
Sets the data behind this ListView.
void setAddPositionsList(ArrayList<Integer> a)
void setAdjustFooter(boolean b)
void setCacheColorHint(int color)
When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background.
void setClickAnimationScaleX(float scaleX)
Sets the scale X of item of click animation.
void setClickAnimationScaleY(float scaleY)
Sets the scale Y of item of click animation.
void setDarkModeEnabled(boolean enabled)
Specifies if the background is in dark style.
void setDelPositionsList(ArrayList<Integer> d)
void setDivider(Drawable divider)
Sets the drawable that will be drawn between each item in the list.
void setDividerHeight(int height)
Sets the height of the divider that will be drawn between each item in the list.
void setDrawBottomShadow(boolean isEnabled)
Sets whether draw the bottom shadow of listView
void setDrawPressShadow(boolean isEnabled)
Sets whether draw the shadow of pressed item or not
void setFastScrollSectionsDirty()
void setFillEmpty(boolean fillEmpty)
Sets whether listview will expand height to fill parent without showing listview background.
void setFilterText(String filterText)
void setFootAdjusted(boolean b)
void setFooterDividersEnabled(boolean footerDividersEnabled)
Enables or disables the drawing of the divider for footer views.
void setForceAdjustFooter(boolean b)
void setHeaderDividersEnabled(boolean headerDividersEnabled)
Enables or disables the drawing of the divider for header views.
void setIntroAnimationDelay(int delay)
Sets the delay in milliseconds before the intro animation runs
void setIntroAnimationType(int type)
Indicates the intro aniamtion type
void setItemsCanFocus(boolean itemsCanFocus)
Indicates that the views created by the ListAdapter can contain focusable items.
void setListBackground(Drawable dr)
void setMiddleDivider(Drawable dr)
void setOverscrollFooter(Drawable footer)
Sets the drawable that will be drawn below all other list content.
void setOverscrollHeader(Drawable header)
Sets the drawable that will be drawn above all other list content.
void setRemoteViewsAdapter(Intent intent)
Sets up this AbsListView to use a remote views adapter which connects to a RemoteViewsService through the specified intent.
void setRoundBackground(Drawable dr)
void setSelection(int position)
Sets the currently selected item.
void setSelectionAfterHeaderView()
setSelectionAfterHeaderView set the selection to be the first list item after the header views.
void setSelectionFromTop(int position, int y)
Sets the selected item and positions the selection y pixels from the top edge of the ListView.
void setSelector(Drawable selector)
void setSeperatorDiver(Drawable drawable)
void setTransparentWrap(boolean b)
void setWrappingHeader(boolean b)
void smoothScrollByOffset(int offset)
Smoothly scrolls to the specified adapter position offset.
void smoothScrollToPosition(int position)
Smoothly scrolls to the specified adapter position.
void startIntroAnimation()
Plays the intro animation
Protected Methods
boolean canAnimate()
void dispatchDraw(Canvas canvas)
void doAnimFinalize()
boolean drawChild(Canvas canvas, View child, long drawingTime)
void drawEndRound(Canvas canvas, int bottomPos, boolean drawEndRound)
void drawXfer(Canvas canvas, Rect bounds, Drawable drawable, Paint paint)
View findViewTraversal(int id)
View findViewWithTagTraversal(Object tag)
int getChildDrawingOrder(int childCount, int i)
void layoutChildren()
void onConfigurationChanged(Configuration newConfig)
void onDetachedFromWindow()
void onFinishInflate()
void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void onSizeChanged(int w, int h, int oldw, int oldh)
void releaseItem()
void releaseItem(View releasedView)
boolean shouldDrawSeperatorDivider(int position)
[Expand]
Inherited Methods
From class com.htc.widget.HtcAbsListView
From class com.htc.widget.HtcAdapterView
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.graphics.drawable.Drawable.Callback2
From interface android.text.TextWatcher
From interface android.view.GestureDetector.OnGestureListener
From interface android.view.HtcIfViewGroup
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.ViewTreeObserver.OnGlobalLayoutListener
From interface android.view.ViewTreeObserver.OnTouchModeChangeListener
From interface android.view.accessibility.AccessibilityEventSource
From interface android.widget.Filter.FilterListener

XML Attributes

android:divider

Since: API Level

Drawable or color to draw between list items.

May be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

This corresponds to the global attribute resource symbol divider.

Related Methods

android:dividerHeight

Since: API Level

Height of the divider. Will use the intrinsic height of the divider if this is not specified.

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol dividerHeight.

Related Methods

android:entries

Since: API Level

Reference to an array resource that will populate the ListView. For static content, this is simpler than populating the ListView programmatically.

Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

This corresponds to the global attribute resource symbol entries.

Related Methods

android:footerDividersEnabled

Since: API Level

When set to false, the ListView will not draw the divider before each footer view. The default value is true.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol footerDividersEnabled.

Related Methods

android:headerDividersEnabled

Since: API Level

When set to false, the ListView will not draw the divider after each header view. The default value is true.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

This corresponds to the global attribute resource symbol headerDividersEnabled.

Related Methods

Constants

public static final int DEFAULT_INTRO_ANIMATION

Since: API Level 2.0

Used to indicate the intro animation type

Constant Value: 0 (0x00000000)

public static final int DOWN_INTRO_ANIMATION

Since: API Level 2.0

Constant Value: 1 (0x00000001)

public static final int LEFT_INTRO_ANIMATION

Since: API Level 2.0

Constant Value: 4 (0x00000004)

public static final int RIGHT_INTRO_ANIMATION

Since: API Level 2.0

Constant Value: 3 (0x00000003)

public static final int UP_INTRO_ANIMATION

Since: API Level 2.0

Constant Value: 2 (0x00000002)

Fields

protected AnimatorSet mBoucingAnimatorSet

Since: API Level 4.1

protected int mEmptyHeight

Since: API Level 2.0

Public Constructors

public HtcListView (Context context)

Since: API Level 2.0

public HtcListView (Context context, AttributeSet attrs)

Since: API Level 2.0

public HtcListView (Context context, AttributeSet attrs, int defStyle)

Since: API Level 2.0

Public Methods

public void addFootViewWithoutDivider (View v, Object data, boolean isSelectable)

Since: API Level 2.0

Adds a fixed view to appear at the bottom of the list. If addFooterView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that that will also account for header views.

Parameters
v The view to add.
data Data to associate with this view
isSelectable true if the footer view can be selected

public void addFooterView (View v, Object data, boolean isSelectable)

Since: API Level 2.0

Adds a fixed view to appear at the bottom of the list. If addFooterView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will also account for header and footer views.

Parameters
v The view to add.
data Data to associate with this view
isSelectable true if the footer view can be selected

public void addFooterView (View v)

Since: API Level 2.0

Adds a fixed view to appear at the bottom of the list. If addFooterView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will also account for header and footer views.

Parameters
v The view to add.

public void addHeaderView (View v, Object data, boolean isSelectable)

Since: API Level 2.0

Adds a fixed view to appear at the top of the list. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will also account for header and footer views.

Parameters
v The view to add.
data Data to associate with this view
isSelectable Whether the item is selectable

public void addHeaderView (View v)

Since: API Level 2.0

Adds a fixed view to appear at the top of the list. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will also account for header and footer views.

Parameters
v The view to add.

public boolean dispatchKeyEvent (KeyEvent event)

Since: API Level

public boolean dispatchTouchEvent (MotionEvent ev)

Since: API Level 4.9

public void draw (Canvas canvas)

Since: API Level 4.9

public void enableAnimation (int anim_id, boolean enable)

Since: API Level 2.0

Enables or disables one kind of animation; default : enable all animations HtcAbsListView.ANIM_OVERSCROLL, ANIM_INTRO, ANIM_CLICK, ANIM_ADD, ANIM_DEL; can use bit operation, e.g.: ANIM_OVERSCROLL & ANIM_INTRO

Parameters
anim_id HtcAbsListView.ANIM_OVERSCROLL, ANIM_INTRO, ANIM_CLICK, ANIM_ADD, ANIM_DEL;
enable true or false

public ListAdapter getAdapter ()

Since: API Level 2.0

Returns the adapter currently in use in this ListView. The returned adapter might not be the same adapter passed to setAdapter(ListAdapter) but might be a WrapperListAdapter.

Returns
  • The adapter currently used to display data in this ListView.

public long[] getCheckItemIds ()

Since: API Level 2.0

This method is deprecated.
Use #getCheckedItemIds() instead.

Returns the set of checked items ids. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE.

Returns
  • A new array which contains the id of each checked item in the list.

public Drawable getDivider ()

Since: API Level 2.0

Returns the drawable that will be drawn between each item in the list.

Returns
  • The current drawable drawn between list elements

public int getDividerHeight ()

Since: API Level 2.0

Returns
  • Returns the height of the divider that will be drawn between each item in the list.

public int getFooterViewsCount ()

Since: API Level 2.0

Returns the number of footer views in the list. Footer views are special views at the bottom of the list that should not be recycled during a layout.

Returns
  • The number of footer views, 0 in the default implementation.

public int getHeaderViewsCount ()

Since: API Level 2.0

Returns the number of header views in the list. Header views are special views at the top of the list that should not be recycled during a layout.

Returns
  • The number of header views, 0 in the default implementation.

public boolean getItemsCanFocus ()

Since: API Level 2.0

Returns
  • Whether the views created by the ListAdapter can contain focusable items.

public Drawable getListSelectorPressed ()

Since: API Level 4.0

public int getMaxScrollAmount ()

Since: API Level 2.0

Returns
  • The maximum amount a list view will scroll in response to an arrow event.

public Drawable getOverscrollFooter ()

Since: API Level 4.0

Returns
  • The drawable that will be drawn below all other list content

public Drawable getOverscrollHeader ()

Since: API Level 4.0

Returns
  • The drawable that will be drawn above all other list content

public boolean isFootAdjusted ()

Since: API Level 4.0

public boolean isOpaque ()

Since: API Level

public boolean isOverListHeight ()

Since: API Level 4.0

public boolean onDown (MotionEvent e)

Since: API Level 4.0

public boolean onFling (MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)

Since: API Level 4.0

public boolean onInterceptTouchEvent (MotionEvent event)

Since: API Level 4.9

public boolean onKeyDown (int keyCode, KeyEvent event)

Since: API Level 4.9

public boolean onKeyMultiple (int keyCode, int repeatCount, KeyEvent event)

Since: API Level

public boolean onKeyUp (int keyCode, KeyEvent event)

Since: API Level 4.9

public void onLongPress (MotionEvent e)

Since: API Level 4.0

public void onScroll (HtcAbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)

Since: API Level 2.0

Callback method to be invoked when the list or grid has been scrolled. This will be called after the scroll has completed

Parameters
view The view whose scroll state is being reported
firstVisibleItem The index of the first visible cell (ignore if visibleItemCount == 0)
visibleItemCount The number of visible cells
totalItemCount The number of items in the list adaptor

public boolean onScroll (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)

Since: API Level 4.0

public void onScrollStateChanged (HtcAbsListView view, int scrollState)

Since: API Level 2.0

Callback method to be invoked while the list view or grid view is being scrolled. If the view is being scrolled, this method will be called before the next frame of the scroll is rendered. In particular, it will be called before any calls to getView(int, View, ViewGroup).

Parameters
view The view whose scroll state is being reported
scrollState The current scroll state. One of #SCROLL_STATE_IDLE, #SCROLL_STATE_TOUCH_SCROLL or #SCROLL_STATE_IDLE.

public void onShowPress (MotionEvent e)

Since: API Level 4.0

public boolean onSingleTapUp (MotionEvent e)

Since: API Level 4.0

public boolean onTouchEvent (MotionEvent ev)

Since: API Level 4.9

public void onWindowFocusChanged (boolean hasWindowFocus)

Since: API Level 4.9

public boolean performItemClick (View view, int position, long id)

Since: API Level 2.0

Parameters
view The view within the AdapterView that was clicked.
position The position of the view in the adapter.
id The row id of the item that was clicked.
Returns
  • True if there was an assigned OnItemClickListener that was called, false otherwise is returned.

public boolean removeFooterView (View v)

Since: API Level 2.0

Removes a previously-added footer view.

Parameters
v The view to remove
Returns
  • true if the view was removed, false if the view was not a footer view

public boolean removeHeaderView (View v)

Since: API Level 2.0

Removes a previously-added header view.

Parameters
v The view to remove
Returns
  • true if the view was removed, false if the view was not a header view

public boolean requestChildRectangleOnScreen (View child, Rect rect, boolean immediate)

Since: API Level

public void scrollToFirstAddedPosition (int pos)

Since: API Level 4.0

public void set2DPressAnimationEnabled (boolean enabled)

Since: API Level 4.0

Enable or disable 2D Press Animation

public void setActivatedPortrait (boolean b)

Since: API Level 4.0

Enables activated background for item in portrait mode. default value is false;

Parameters
b true: enable; false: disable

public void setAdapter (ListAdapter adapter)

Since: API Level 2.0

Sets the data behind this ListView. The adapter passed to this method may be wrapped by a WrapperListAdapter, depending on the ListView features currently in use. For instance, adding headers and/or footers will cause the adapter to be wrapped.

Parameters
adapter The ListAdapter which is responsible for maintaining the data backing this list and for producing a view to represent an item in that data set.
See Also

public void setAddPositionsList (ArrayList<Integer> a)

Since: API Level 2.0

public void setAdjustFooter (boolean b)

Since: API Level 4.0

public void setCacheColorHint (int color)

Since: API Level 2.0

When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background. Zero means that what's behind this object is translucent (non solid) or is not made of a single color. This hint will not affect any existing background drawable set on this view ( typically set via setBackgroundDrawable(Drawable)).

Parameters
color The background color

public void setClickAnimationScaleX (float scaleX)

Since: API Level 4.2

Sets the scale X of item of click animation.

public void setClickAnimationScaleY (float scaleY)

Since: API Level 4.2

Sets the scale Y of item of click animation.

public void setDarkModeEnabled (boolean enabled)

Since: API Level 4.0

Specifies if the background is in dark style. The would impact the background of the child item.

Parameters
enabled True if dark mode is enabled.

public void setDelPositionsList (ArrayList<Integer> d)

Since: API Level 2.0

public void setDivider (Drawable divider)

Since: API Level 2.0

Sets the drawable that will be drawn between each item in the list. If the drawable does not have an intrinsic height, you should also call setDividerHeight(int)

Parameters
divider The drawable to use.

public void setDividerHeight (int height)

Since: API Level 2.0

Sets the height of the divider that will be drawn between each item in the list. Calling this will override the intrinsic height as set by setDivider(Drawable)

Parameters
height The new height of the divider in pixels.

public void setDrawBottomShadow (boolean isEnabled)

Sets whether draw the bottom shadow of listView

Parameters
isEnabled If true, draw bottom shadow of listView. Otherwise, do not draw it.

public void setDrawPressShadow (boolean isEnabled)

Sets whether draw the shadow of pressed item or not

Parameters
isEnabled If true, draw shadow of pressed item. Otherwise, do not draw it.

public void setFastScrollSectionsDirty ()

Since: API Level 2.0

public void setFillEmpty (boolean fillEmpty)

Since: API Level 2.0

Sets whether listview will expand height to fill parent without showing listview background.

Parameters
fillEmpty Sets true to enable fill empty and false to disable.

public void setFilterText (String filterText)

Since: API Level 2.0

public void setFootAdjusted (boolean b)

Since: API Level 4.0

public void setFooterDividersEnabled (boolean footerDividersEnabled)

Since: API Level 2.0

Enables or disables the drawing of the divider for footer views.

Parameters
footerDividersEnabled True to draw the footers, false otherwise.

public void setForceAdjustFooter (boolean b)

Since: API Level 2.0

public void setHeaderDividersEnabled (boolean headerDividersEnabled)

Since: API Level 2.0

Enables or disables the drawing of the divider for header views.

Parameters
headerDividersEnabled True to draw the headers, false otherwise.

public void setIntroAnimationDelay (int delay)

Since: API Level 2.0

Sets the delay in milliseconds before the intro animation runs

public void setIntroAnimationType (int type)

Since: API Level 2.0

Indicates the intro aniamtion type

Parameters
type The intro animation type

public void setItemsCanFocus (boolean itemsCanFocus)

Since: API Level 2.0

Indicates that the views created by the ListAdapter can contain focusable items.

Parameters
itemsCanFocus true if items can get focus, false otherwise

public void setListBackground (Drawable dr)

Since: API Level 2.0

public void setMiddleDivider (Drawable dr)

Since: API Level 2.0

public void setOverscrollFooter (Drawable footer)

Since: API Level 4.0

Sets the drawable that will be drawn below all other list content. This area can become visible when the user overscrolls the list, or when the list's content does not fully fill the container area.

Parameters
footer The drawable to use

public void setOverscrollHeader (Drawable header)

Since: API Level 4.0

Sets the drawable that will be drawn above all other list content. This area can become visible when the user overscrolls the list.

Parameters
header The drawable to use

public void setRemoteViewsAdapter (Intent intent)

Since: API Level 4.0

Sets up this AbsListView to use a remote views adapter which connects to a RemoteViewsService through the specified intent.

Parameters
intent The intent used to identify the RemoteViewsService for the adapter to connect to.

public void setRoundBackground (Drawable dr)

Since: API Level 2.0

public void setSelection (int position)

Since: API Level 2.0

Sets the currently selected item. If in touch mode, the item will not be selected but it will still be positioned appropriately. If the specified selection position is less than 0, then the item at position 0 will be selected.

Parameters
position Index (starting at 0) of the data item to be selected.

public void setSelectionAfterHeaderView ()

Since: API Level 2.0

setSelectionAfterHeaderView set the selection to be the first list item after the header views.

public void setSelectionFromTop (int position, int y)

Since: API Level 2.0

Sets the selected item and positions the selection y pixels from the top edge of the ListView. (If in touch mode, the item will not be selected but it will still be positioned appropriately.)

Parameters
position Index (starting at 0) of the data item to be selected.
y The distance from the top edge of the ListView (plus padding) that the item will be positioned.

public void setSelector (Drawable selector)

Since: API Level 2.0

public void setSeperatorDiver (Drawable drawable)

Since: API Level 2.0

public void setTransparentWrap (boolean b)

Since: API Level 2.0

public void setWrappingHeader (boolean b)

Since: API Level 2.0

public void smoothScrollByOffset (int offset)

Since: API Level 4.0

Smoothly scrolls to the specified adapter position offset. The view will scroll such that the indicated position is displayed.

Parameters
offset The amount to offset from the adapter position to scroll to.

public void smoothScrollToPosition (int position)

Since: API Level 2.0

Smoothly scrolls to the specified adapter position. The view will scroll such that the indicated position is displayed.

Parameters
position Scroll to this adapter position.

public void startIntroAnimation ()

Since: API Level 2.0

Plays the intro animation

Protected Methods

protected boolean canAnimate ()

Since: API Level

protected void dispatchDraw (Canvas canvas)

Since: API Level 4.9

protected void doAnimFinalize ()

Since: API Level 4.1

protected boolean drawChild (Canvas canvas, View child, long drawingTime)

Since: API Level

protected void drawEndRound (Canvas canvas, int bottomPos, boolean drawEndRound)

Since: API Level 4.0

protected void drawXfer (Canvas canvas, Rect bounds, Drawable drawable, Paint paint)

Since: API Level 4.0

protected View findViewTraversal (int id)

Since: API Level

protected View findViewWithTagTraversal (Object tag)

Since: API Level

protected int getChildDrawingOrder (int childCount, int i)

Since: API Level

protected void layoutChildren ()

Since: API Level 2.0

protected void onConfigurationChanged (Configuration newConfig)

Since: API Level

protected void onDetachedFromWindow ()

Since: API Level 4.9

protected void onFinishInflate ()

Since: API Level

protected void onFocusChanged (boolean gainFocus, int direction, Rect previouslyFocusedRect)

Since: API Level 4.9

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

Since: API Level 4.9

protected void onSizeChanged (int w, int h, int oldw, int oldh)

Since: API Level

protected void releaseItem ()

Since: API Level 4.1

protected void releaseItem (View releasedView)

Since: API Level 4.7

protected boolean shouldDrawSeperatorDivider (int position)

Since: API Level 2.0