Android翻页效果—电子书(6)
super
(
context)
;
}
public
PageViewP1(
Context
context, AttributeSet
attrs )
{
super
(
context, attrs )
;
this
.mBackPage
=
this
.getBackground
(
)
;
this
.mCorner
=
-
1
;
}
void
setPageTurner(
PageTurnerViewP1 pageTurnerViewP1)
{
this
.mPageTurner
=
pageTurnerViewP1;
}
void
setClipPath(
Path clipPath)
{
this
.mClipPath
=
clipPath;
}
public
void
setCallback(
Callback callback)
{
this
.mCallback
=
callback;
}
void
drawBackPage(
Canvas
canvas)
{
if
(
this
.mCallback
!=
null
)
this
.mCallback
.onDrawBackPage
(
canvas)
;
}
void
drawBackground(
Canvas
canvas)
{
if
(
this
.mCallback
!=
null
)
this
.mCallback
.onDrawBackground
(
canvas)
;
}
public
void
startPageTurn(
)
{
if
(
this
.mPageTurner
!=
null
)
this
.mPageTurner
.startPageTurn
(
0
)
;
}
void
onPageTurnFinished(
Canvas
canvas)
{
this
.mCallback
.onPageTurnFinished
(
canvas)
;
this
.mClipPath
=
null
;
}
protected
void
相关新闻>>
- 发表评论
-
- 最新评论 更多>>