Start motion scene programmatically

后端 未结 5 961
心在旅途
心在旅途 2020-12-30 21:12

I have a motion layout with this layoutDescription: app:layoutDescription=\"@xml/scene\"

scene.xml



        
5条回答
  •  滥情空心
    2020-12-30 21:40

    In Latest Update of Constraint **2.0.0-beta1** Layout There are Public methods add in motion layout 
            you can get these methods with the help of motionlayout id 
        **motionLayout** 
    
         1. public void setProgress (float pos) 
         2. public void setTransition (int
               beginId,int endId)  
         3. public void setTransitionDuration (int
                   milliseconds)  public void setTransitionListener
                   (MotionLayout.TransitionListener listener)
    
         4. public void setState (int
                   id,int screenWidth, 
                                 int screenHeight)
    
         5. if(wantShowUi)
                {
                    newUserActivityBinding.coordinatorLayout.transitionToStart();
                }
                else
                {
                    newUserActivityBinding.coordinatorLayout.transitionToEnd();
                }
    
          
    
                
    
    
            
    

提交回复
热议问题