日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSComponentTransition

ComponentTransition

java.lang.Object

|---ohos.agp.components.ComponentTransition

public class ComponentTransition
extends Object

為 ComponentContainer 對象的布局更改提供動畫。

要在布局容器上執(zhí)行布局轉(zhuǎn)換,請創(chuàng)建一個 ComponentTransition 對象,然后使用 ComponentContainer#setComponentTransition 設(shè)置一個 ComponentContainer 對象。

字段摘要

修飾符和類型 字段 描述
static intCHANGING指示在由布局修改更改的組件上運行的動畫,而不是通過在布局容器中添加或刪除組件。
static intOTHERS_GONE指示在組件上運行的動畫,因為它們的關(guān)聯(lián)組件之一從 ComponentContainer 中消失而發(fā)生更改。
static intOTHERS_SHOW指示在組件上運行的動畫,因為它們的關(guān)聯(lián)組件之一出現(xiàn)在 ComponentContainer 中而發(fā)生更改。
static intSELF_GONE表示當(dāng)組件從 ComponentContainer 中消失時在組件上運行的動畫。
static intSELF_SHOW表示當(dāng)組件出現(xiàn)在 ComponentContainer 中時在組件上運行的動畫。

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

構(gòu)造函數(shù) 描述
ComponentTransition()用于創(chuàng)建 ComponentTransition 實例的默認(rèn)構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類型 方法 描述
voidaddTransitionType(int type)為 ComponentTransition 對象啟用過渡類型。
AnimatorPropertygetAnimatorProperty(int type)獲取指定轉(zhuǎn)場類型的組件屬性動畫器。
booleanhasTransitionType(int type)檢查是否為 ComponentTransition 對象啟用了指定的過渡類型。
voidrelease()釋放一個 ComponentTransition 對象。
voidremoveTransitionType(int type)從 ComponentTransition 對象中移除過渡類型。
voidsetAnimatorProperty(int type, AnimatorProperty animator)設(shè)置指定轉(zhuǎn)換類型的可自定義組件屬性動畫器。
voidsetTransitionTypeDuration(int type, int duration)設(shè)置指定過渡類型動畫的持續(xù)時間。
從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

字段詳細信息

CHANGING

public static final int CHANGING

指示在由布局修改更改的組件上運行的動畫,而不是通過在布局容器中添加或刪除組件。

默認(rèn)情況下,此轉(zhuǎn)換類型被禁用。 您可以調(diào)用 addTransitionType(int) 來啟用它。

OTHERS_GONE

public static final int OTHERS_GONE

指示在組件上運行的動畫,因為它們的關(guān)聯(lián)組件之一從 ComponentContainer 中消失而發(fā)生更改。

OTHERS_SHOW

public static final int OTHERS_SHOW

指示在組件上運行的動畫,因為它們的關(guān)聯(lián)組件之一出現(xiàn)在 ComponentContainer 中而發(fā)生更改。

SELF_GONE

public static final int SELF_GONE

表示當(dāng)組件從 ComponentContainer 中消失時在組件上運行的動畫。

SELF_SHOW

public static final int SELF_SHOW

表示當(dāng)組件出現(xiàn)在 ComponentContainer 中時在組件上運行的動畫。

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

ComponentTransition

public ComponentTransition()

用于創(chuàng)建 ComponentTransition 實例的默認(rèn)構(gòu)造函數(shù)。

方法詳情

release

public void release()

釋放一個 ComponentTransition 對象。

addTransitionType

public void addTransitionType(int type)

為 ComponentTransition 對象啟用過渡類型。

過渡類型包括 SELF_SHOW、OTHERS_SHOW、OTHERS_GONE、SELF_GONE 和 CHANGING。

參數(shù):

參數(shù)名稱 參數(shù)描述
type指示要啟用的轉(zhuǎn)換類型。

removeTransitionType

public void removeTransitionType(int type)

從 ComponentTransition 對象中移除過渡類型。

默認(rèn)情況下,啟用除 CHANGING 之外的所有轉(zhuǎn)換類型。

參數(shù):

參數(shù)名稱 參數(shù)描述
type指示要刪除的轉(zhuǎn)換類型。

hasTransitionType

public boolean hasTransitionType(int type)

檢查是否為 ComponentTransition 對象啟用了指定的過渡類型。

參數(shù):

參數(shù)名稱 參數(shù)描述
type表示指定的過渡類型。

返回:

如果添加了指定的過渡類型,則返回 true; 否則返回 false。

setTransitionTypeDuration

public void setTransitionTypeDuration(int type, int duration)

設(shè)置指定過渡類型動畫的持續(xù)時間。

參數(shù):

參數(shù)名稱 參數(shù)描述
type表示指定的轉(zhuǎn)場類型,可以是SELF_SHOW、OTHERS_SHOW、OTHERS_GONE、SELF_GONE或CHANGING。
duration指示過渡動畫的持續(xù)時間,以毫秒為單位。

setAnimatorProperty

public void setAnimatorProperty(int type, AnimatorProperty animator)

設(shè)置指定轉(zhuǎn)換類型的可自定義組件屬性動畫器。

參數(shù):

參數(shù)名稱 參數(shù)描述
type表示指定的轉(zhuǎn)場類型,可以是SELF_SHOW、OTHERS_SHOW、OTHERS_GONE、SELF_GONE或CHANGING。
animator表示組件屬性動畫器。

getAnimatorProperty

public AnimatorProperty getAnimatorProperty(int type)

獲取指定轉(zhuǎn)場類型的組件屬性動畫器。

參數(shù):

參數(shù)名稱 參數(shù)描述
type表示指定的轉(zhuǎn)場類型,可以是SELF_SHOW、OTHERS_SHOW、OTHERS_GONE、SELF_GONE或CHANGING。

返回:

返回指定轉(zhuǎn)場類型的AnimatorProperty對象; 否則返回 null。


分享名稱:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSComponentTransition
網(wǎng)頁鏈接:http://www.dlmjj.cn/article/cdjsipi.html