Code example for LayoutAnimationController

0
    } 
 
    @Test 
    public void testLayoutAnimation() { 
        assertThat(root.getLayoutAnimation()).isNull();
        LayoutAnimationController layoutAnim = new LayoutAnimationController(context, null);
        root.setLayoutAnimation(layoutAnim);
        assertThat(root.getLayoutAnimation()).isSameAs(layoutAnim);
    } 
 
    @Test 
    public void testRemoveChildAt() throws Exception { 
        root.removeViewAt(1);
 
        assertThat(root.getChildCount()).isEqualTo(2);
        assertThat(root.getChildAt(0)).isSameAs(child1);
        assertThat(root.getChildAt(1)).isSameAs((View) child3);
 
        assertThat(child2.getParent()).isNull();
    }