2016-07-13 14 views

答えて

23

Androidのサポートのためにあなたがこれらの行を追加する必要がありthisを1として:

import { 
    UIManager, 
    LayoutAnimation 
} from 'react-native'; 

//.. 

UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); 
+0

ニース!アニメーションページの下に配置するが、LayoutAnimationページに配置しないので、私はそれを見ていない! – nomad

+0

@nomad right、喜んで助けてください。また、 'react-native'から' UIManager'をインポートする必要があることに注意してください、私はそれを私の答えに加えました – Cherniv

2

まず輸入以下:

コンポーネントクラスで、その後
import { 
    UIManager, 
    LayoutAnimation, Platform 
} from 'raect-native'; 

constructor() { 
    super(); 
    if (Platform.OS === 'android') { 
     UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); 
    } 
} 

これは、どのように私のために働いた。

関連する問題