SwipeView类似桌面的滑动界面(23)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-06 08:44 点击:次
indicators.add(imageView);
addView(imageView);
}
}
/**
* Return the number of pages this PageControl has
*
* @return Returns the number of pages this PageControl has
*/
public int getPageCount()
{
return mPageCount;
}
/**
* Set the current page the PageControl should be on
*
* @param currentPage The current page the PageControl should be on
*/
public void setCurrentPage(int currentPage)
{
if(currentPage<mPageCount)
{
indicators.get(mCurrentPage).setBackgroundDrawable(inactiveDrawable);//reset old indicator
indicators.get(currentPage).setBackgroundDrawable(activeDrawable);//set up new indicator
mCurrentPage = currentPage;
}
}
/**
* Return the current page the PageControl is on
*
* @return Returns the current page the PageControl is on
*/
public int getCurrentPage()
{
return mCurrentPage;
}
/**
* Set the size of the page indicator drawables
*
* @param indicatorSize The size of the page indicator drawables
*/
public void setIndicatorSize(int indicatorSize)
{
mIndicatorSize=indicatorSize;
for(int i=0;i<mPageCount;i++)
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>