SwipeView类似桌面的滑动界面(17)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-06 08:44 点击:次
private int mPageCount = 0;
private int mCurrentPage = 0;
private Context mContext;
private OnPageControlClickListener mOnPageControlClickListener = null;
public PageControl(Context context)
{
super(context);
mContext = context;
initPageControl();
}
public PageControl(Context context, AttributeSet attrs)
{
super(context, attrs);
mContext = context;
//will now wait until onFinishInflate to call initPageControl()
}
@Override
protected void onFinishInflate()
{
initPageControl();
}
private void initPageControl()
{
Log.i("uk.co.jasonfry.android.tools.ui.PageControl","Initialising PageControl");
indicators = new ArrayList<ImageView>();
activeDrawable = new ShapeDrawable();
inactiveDrawable = new ShapeDrawable();
activeDrawable.setBounds(0, 0, mIndicatorSize, mIndicatorSize);
inactiveDrawable.setBounds(0, 0, mIndicatorSize, mIndicatorSize);
Shape s1 = new OvalShape();
s1.resize(mIndicatorSize, mIndicatorSize);
Shape s2 = new OvalShape();
s2.resize(mIndicatorSize, mIndicatorSize);
int i[] = new int[2];
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>