鴻蒙OS PageSlider.ReboundEffectParams

2022-09-28 09:25 更新

PageSlider.ReboundEffectParams

java.lang.Object

|---ohos.agp.components.PageSlider.ReboundEffectParams

public static class PageSlider.ReboundEffectParams
extends Object

表示回彈效果參數(shù)。

Since:

4

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
ReboundEffectParams(int overscrollPercent, float overscrollRate, int remainVisiblePercent) 用于創(chuàng)建 ReboundEffectParams 實(shí)例的構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類型 方法 描述
int getOverscrollPercent() 獲取 overscrollPercent 參數(shù)的值。
float getOverscrollRate() 獲取 overscrollRate 參數(shù)的值。
int getRemainVisiblePercent() 獲取保持可見百分比參數(shù)的值。
void setOverscrollPercent(int overscrollPercent) 設(shè)置 overscrollPercent 參數(shù)的值。
void setOverscrollRate(float overscrollRate) 設(shè)置 overscrollRate 參數(shù)的值。
void setRemainVisiblePercent(int remainVisiblePercent) 設(shè)置保持可見百分比參數(shù)的值。
從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

構(gòu)造函數(shù)詳細(xì)信息

ReboundEffectParams

public ReboundEffectParams(int overscrollPercent, float overscrollRate, int remainVisiblePercent)

用于創(chuàng)建 ReboundEffectParams 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱 參數(shù)描述
overscrollPercent 表示過度滾動百分比(默認(rèn)值:40)。 如果滾動內(nèi)容的百分比超過該參數(shù)的值,則內(nèi)容滾動速度受 overscrollRate 參數(shù)的影響。 具體來說,如果 overscrollRate 的值小于 1.0,則您的手指移動速度快于內(nèi)容。
overscrollRate 表示過度滾動率(默認(rèn)值:0.6)。 如果滾動內(nèi)容的百分比超過 overscrollPercent 參數(shù)的值,此參數(shù)會影響內(nèi)容滾動速度。 具體來說,內(nèi)容滾動速度等于手指滾動速度乘以overscrollRate的值。
remainVisiblePercent 指示在過度滾動期間應(yīng)保持可見的可滾動內(nèi)容的最小百分比。 默認(rèn)值為 20。

Since:

4

方法詳情

getOverscrollPercent

public int getOverscrollPercent()

獲取 overscrollPercent 參數(shù)的值。

如果滾動內(nèi)容的百分比超過此參數(shù)的值(默認(rèn)值:40),則內(nèi)容滾動速度受 overscrollRate 參數(shù)的影響。 如果 overscrollRate 的值小于 1.0,則您的手指移動速度比內(nèi)容快。

返回:

返回 overscrollPercent 的值。

Since:

4

getOverscrollRate

public float getOverscrollRate()

獲取 overscrollRate 參數(shù)的值。

如果滾動內(nèi)容的百分比超過 overscrollPercent 參數(shù)的值,此參數(shù)會影響內(nèi)容滾動速度。 具體來說,內(nèi)容滾動速度等于手指滾動速度乘以overscrollRate的值(默認(rèn)值:0.6)。

返回:

返回 overscrollRate 的值。

Since:

4

getRemainVisiblePercent

public int getRemainVisiblePercent()

獲取保持可見百分比參數(shù)的值。

此參數(shù)指示在過度滾動期間應(yīng)保持可見的可滾動內(nèi)容的最小百分比。 默認(rèn)值為 20。

返回:

返回保持可見百分比的值。

Since:

4

setOverscrollPercent

public void setOverscrollPercent(int overscrollPercent)

設(shè)置 overscrollPercent 參數(shù)的值。

該參數(shù)表示滾動百分比(默認(rèn)值:40)。 如果滾動內(nèi)容的百分比超過該參數(shù)的值,則內(nèi)容滾動速度受 overscrollRate 參數(shù)的影響。 具體來說,如果 overscrollRate 的值小于 1.0,則您的手指移動速度快于內(nèi)容。

參數(shù):

參數(shù)名稱 參數(shù)描述
overscrollPercent 表示 overscrollPercent 的值。

Since:

4

setOverscrollRate

public void setOverscrollRate(float overscrollRate)

設(shè)置 overscrollRate 參數(shù)的值。

該參數(shù)表示過卷率(默認(rèn)值:0.6)。 如果滾動內(nèi)容的百分比超過 overscrollPercent 參數(shù)的值,則會影響內(nèi)容滾動速度。 具體來說,內(nèi)容滾動速度等于手指滾動速度乘以overscrollRate的值。

參數(shù):

參數(shù)名稱 參數(shù)描述
overscrollRate 表示 overscrollRate 的值。

Since:

4

setRemainVisiblePercent

public void setRemainVisiblePercent(int remainVisiblePercent)

設(shè)置保持可見百分比參數(shù)的值。

此參數(shù)指示在過度滾動期間應(yīng)保持可見的可滾動內(nèi)容的最小百分比。 默認(rèn)值為 20。

參數(shù):

參數(shù)名稱 參數(shù)描述
remainVisiblePercent 表示保持可見百分比的值。

Since:

4

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號