ScrollView滚动视图Word文档下载推荐.docx

上传人:b****6 文档编号:19634740 上传时间:2023-01-08 格式:DOCX 页数:21 大小:24.36KB
下载 相关 举报
ScrollView滚动视图Word文档下载推荐.docx_第1页
第1页 / 共21页
ScrollView滚动视图Word文档下载推荐.docx_第2页
第2页 / 共21页
ScrollView滚动视图Word文档下载推荐.docx_第3页
第3页 / 共21页
ScrollView滚动视图Word文档下载推荐.docx_第4页
第4页 / 共21页
ScrollView滚动视图Word文档下载推荐.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

ScrollView滚动视图Word文档下载推荐.docx

《ScrollView滚动视图Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《ScrollView滚动视图Word文档下载推荐.docx(21页珍藏版)》请在冰豆网上搜索。

ScrollView滚动视图Word文档下载推荐.docx

fillViewportsetFillViewport(boolean)Defineswhetherthescrollviewshouldstretchitscontenttofilltheviewport.

[Expand]

InheritedXMLAttributes

Fromclassandroid.widget.FrameLayout

Fromclassandroid.view.ViewGroup

Fromclassandroid.view.View

InheritedConstants

InheritedFields

PublicConstructors

ScrollView(Contextcontext)

ScrollView(Contextcontext,AttributeSetattrs)

ScrollView(Contextcontext,AttributeSetattrs,intdefStyleAttr)

ScrollView(Contextcontext,AttributeSetattrs,intdefStyleAttr,intdefStyleRes)

PublicMethods

voidaddView(Viewchild,intindex)

Addsachildview.

voidaddView(Viewchild,intindex,ViewGroup.LayoutParamsparams)

Addsachildviewwiththespecifiedlayoutparameters.

voidaddView(Viewchild)

voidaddView(Viewchild,ViewGroup.LayoutParamsparams)

booleanarrowScroll(intdirection)

Handlescrollinginresponsetoanupordownarrowclick.

voidcomputeScroll()

CalledbyaparenttorequestthatachildupdateitsvaluesformScrollXandmScrollYifnecessary.

booleandispatchKeyEvent(KeyEventevent)

Dispatchakeyeventtothenextviewonthefocuspath.

voiddraw(Canvascanvas)

Manuallyrenderthisview(andallofitschildren)tothegivenCanvas.

booleanexecuteKeyEvent(KeyEventevent)

Youcancallthisfunctionyourselftohavethescrollviewperformscrollingfromakeyevent,justasiftheeventhadbeendispatchedtoitbytheviewhierarchy.

voidfling(intvelocityY)

Flingthescrollview

booleanfullScroll(intdirection)

Handlesscrollinginresponsetoa"

home/end"

shortcutpress.

CharSequencegetAccessibilityClassName()

Returntheclassnameofthisobjecttobeusedforaccessibilitypurposes.

intgetMaxScrollAmount()

booleanisFillViewport()

IndicateswhetherthisScrollView'

scontentisstretchedtofilltheviewport.

booleanisSmoothScrollingEnabled()

booleanonGenericMotionEvent(MotionEventevent)

Implementthismethodtohandlegenericmotionevents.

booleanonInterceptTouchEvent(MotionEventev)

Implementthismethodtointerceptalltouchscreenmotionevents.

booleanonNestedFling(Viewtarget,floatvelocityX,floatvelocityY,booleanconsumed)

Requestaflingfromanestedscroll.

voidonNestedScroll(Viewtarget,intdxConsumed,intdyConsumed,intdxUnconsumed,intdyUnconsumed)

Reacttoanestedscrollinprogress.

voidonNestedScrollAccepted(Viewchild,Viewtarget,intaxes)

Reacttothesuccessfulclaimingofanestedscrolloperation.

booleanonStartNestedScroll(Viewchild,Viewtarget,intnestedScrollAxes)

Reacttoadescendantviewinitiatinganestablescrolloperation,claimingthenestedscrolloperationifappropriate.

voidonStopNestedScroll(Viewtarget)

Reacttoanestedscrolloperationending.

booleanonTouchEvent(MotionEventev)

Implementthismethodtohandletouchscreenmotionevents.

booleanpageScroll(intdirection)

pageup/down"

voidrequestChildFocus(Viewchild,Viewfocused)

Calledwhenachildofthisparentwantsfocus

booleanrequestChildRectangleOnScreen(Viewchild,Rectrectangle,booleanimmediate)

Calledwhenachildofthisgroupwantsaparticularrectangletobepositionedontothescreen.

voidrequestDisallowInterceptTouchEvent(booleandisallowIntercept)

CalledwhenachilddoesnotwantthisparentanditsancestorstointercepttoucheventswithonInterceptTouchEvent(MotionEvent).

voidrequestLayout()

Callthiswhensomethinghaschangedwhichhasinvalidatedthelayoutofthisview.

voidscrollTo(intx,inty)

Setthescrolledpositionofyourview.

Thisversionalsoclampsthescrollingtotheboundsofourchild.

voidsetFillViewport(booleanfillViewport)

IndicatesthisScrollViewwhetheritshouldstretchitscontentheighttofilltheviewportornot.

voidsetOverScrollMode(intmode)

Settheover-scrollmodeforthisview.

voidsetSmoothScrollingEnabled(booleansmoothScrollingEnabled)

Setwhetherarrowscrollingwillanimateitstransition.

booleanshouldDelayChildPressedState()

ReturntrueifthepressedstateshouldbedelayedforchildrenordescendantsofthisViewGroup.

finalvoidsmoothScrollBy(intdx,intdy)

LikescrollBy(int,int),butscrollsmoothlyinsteadofimmediately.

finalvoidsmoothScrollTo(intx,inty)

LikescrollTo(int,int),butscrollsmoothlyinsteadofimmediately.

ProtectedMethods

intcomputeScrollDeltaToGetChildRectOnScreen(Rectrect)

ComputetheamounttoscrollintheYdirectioninordertogetarectanglecompletelyonthescreen(or,iftallerthanthescreen,atleastthefirstscreensizechunkofit).

intcomputeVerticalScrollOffset()

Computetheverticaloffsetoftheverticalscrollbar'

sthumbwithinthehorizontalrange.

intcomputeVerticalScrollRange()

Thescrollrangeofascrollviewistheoverallheightofallofitschildren.

floatgetBottomFadingEdgeStrength()

Returnsthestrength,orintensity,ofthebottomfadededge.

floatgetTopFadingEdgeStrength()

Returnsthestrength,orintensity,ofthetopfadededge.

voidmeasureChild(Viewchild,intparentWidthMeasureSpec,intparentHeightMeasureSpec)

Askoneofthechildrenofthisviewtomeasureitself,takingintoaccountboththeMeasureSpecrequirementsforthisviewanditspadding.

voidmeasureChildWithMargins(Viewchild,intparentWidthMeasureSpec,intwidthUsed,intparentHeightMeasureSpec,intheightUsed)

Askoneofthechildrenofthisviewtomeasureitself,takingintoaccountboththeMeasureSpecrequirementsforthisviewanditspaddingandmargins.

voidonDetachedFromWindow()

Thisiscalledwhentheviewisdetachedfromawindow.

voidonLayout(booleanchanged,intl,intt,intr,intb)

Calledfromlayoutwhenthisviewshouldassignasizeandpositiontoeachofitschildren.

voidonMeasure(intwidthMeasureSpec,intheightMeasureSpec)

Measuretheviewanditscontenttodeterminethemeasuredwidthandthemeasuredheight.

voidonOverScrolled(intscrollX,intscrollY,booleanclampedX,booleanclampedY)

CalledbyoverScrollBy(int,int,int,int,int,int,int,int,boolean)torespondtotheresultsofanover-scrolloperation.

booleanonRequestFocusInDescendants(intdirection,RectpreviouslyFocusedRect)

Whenlookingforfocusinchildrenofascrollview,needtobealittlemorecarefulnottogivefocustosomethingthatisscrolledoffscreen.

voidonRestoreInstanceState(Parcelablestate)

Hookallowingaviewtore-applyarepresentationofitsinternalstatethathadpreviouslybeengeneratedbyonSaveInstanceState().

ParcelableonSaveInstanceState()

Hookallowingaviewtogeneratearepresentationofitsinternalstatethatcanlaterbeusedtocreateanewinstancewiththatsamestate.

voidonSizeChanged(intw,inth,intoldw,intoldh)

Thisiscalledduringlayoutwhenthesizeofthisviewhaschanged.

InheritedMethods

Fromclassandroid.widget.FrameLayout

Fromclassandroid.view.ViewGroup

Fromclassandroid.view.View

Fromclassjava.lang.Object

Frominterfaceandroid.view.ViewParent

Frominterfaceandroid.view.ViewManager

Frominterfaceandroid.graphics.drawable.Drawable.Callback

Frominterfaceandroid.view.KeyEvent.Callback

Frominterfaceandroid.view.accessibility.AccessibilityEventSource

fillViewport

Defineswhetherthescrollviewshouldstretchitscontenttofilltheviewport.

Mustbeabooleanvalue,either"

true"

or"

false"

.

Thismayalsobeareferencetoaresource(intheform"

@[package:

]type:

name"

)orthemeattribute(intheform"

?

[package:

][type:

]name"

)containingavalueofthistype.

ThiscorrespondstotheglobalattributeresourcesymbolfillViewport.

RelatedMethods

setFillViewport(boolean)

publicScrollView(Contextcontext)

AddedinAPIlevel1

publicScrollView(Contextcontext,AttributeSetattrs)

publicScrollView(Contextcontext,AttributeSetattrs,intdefStyleAttr)

publicScrollView(Contextcontext,AttributeSetattrs,intdefStyleAttr,intdefStyleRes)

AddedinAPIlevel21

publicvoidaddView(Viewchild,intindex)

Addsachildview.Ifnolayoutparametersarealreadysetonthechild,thedefaultparametersforthisViewGrouparesetonth

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 政史地

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1