public class TransitionInflater
extends Object
java.lang.Object | |
↳ | android.transition.TransitionInflater |
该课程从资源文件中扩展场景和转换。 关于转换XML资源描述的信息可以发现Transition
, TransitionSet
, TransitionTarget
, Fade
,并TransitionManager
。
Public methods |
|
---|---|
static TransitionInflater |
from(Context context) 从给定的上下文中获取TransitionInflater。 |
Transition |
inflateTransition(int resource) 从资源加载 |
TransitionManager |
inflateTransitionManager(int resource, ViewGroup sceneRoot) 从资源加载 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
TransitionInflater from (Context context)
从给定的上下文中获取TransitionInflater。
Parameters | |
---|---|
context |
Context
|
Returns | |
---|---|
TransitionInflater |
Transition inflateTransition (int resource)
从资源加载 Transition
对象
Parameters | |
---|---|
resource |
int : The resource id of the transition to load |
Returns | |
---|---|
Transition |
The loaded Transition object |
Throws | |
---|---|
Resources.NotFoundException |
when the transition cannot be loaded |
TransitionManager inflateTransitionManager (int resource, ViewGroup sceneRoot)
从资源加载 TransitionManager
对象
Parameters | |
---|---|
resource |
int : The resource id of the transition manager to load |
sceneRoot |
ViewGroup
|
Returns | |
---|---|
TransitionManager |
The loaded TransitionManager object |
Throws | |
---|---|
Resources.NotFoundException |
when the transition manager cannot be loaded |