安卓动画已经变得波涛汹涌。在功能较弱的设备上丢失帧

时间:2014-04-17 22:31:54

标签: android animation frames

我有以下活动布局,其中包含许多<framelayout>图层,每个图层都包含屏幕上不同位置的图像。一些图像是动画的。这些动画在平板电脑上运行顺畅,但在手机上非常不稳定。布局设计有问题吗?是否有任何技巧可以避免动画不稳定?

以下布局xml被简化以缩短它 `                                                                                                    

    <LinearLayout>
        <LinearLayout>
            <ImageView .../>
            <View/>
            <LinearLayout >
                <View/>
                <FrameLayout >
                    <FrameLayout >
                        <ImageView .../>
                    </FrameLayout>
                    <LinearLayout >
                        <FrameLayout>
                            <TextView/>
                        </FrameLayout>
                        <FrameLayout >
                            <TextView/>
                        </FrameLayout>
                    </LinearLayout>
                </FrameLayout>
                <View/>
            </LinearLayout>
            <View/>
            <ImageView .../>
        </LinearLayout>
        <LinearLayout >
            <FrameLayout >
                <ImageView .../>
                <TextView/>
            </FrameLayout>
            <View />
        </LinearLayout>
        <View />
    </LinearLayout>
</FrameLayout>
<FrameLayout >
    <LinearLayout >
        <View/>
        <FrameLayout >
            <ImageView.../>
        </FrameLayout>
    </LinearLayout>
</FrameLayout>
<FrameLayout>
    <LinearLayout>
        <View/>
        <LinearLayout >
            <View/>
            <ImageView .../>
            <FrameLayout >
                <ImageView .../>
                <ImageView .../>
            </FrameLayout>
            <View/>
        </LinearLayout>
        <View/>
    </LinearLayout>
</FrameLayout>
<LinearLayout >
    <View/>
    <FrameLayout >
        <LinearLayout >
            <View />
            <ImageView .../>
            <View/>
        </LinearLayout>
        <FrameLayout >
            <TextView/>
        </FrameLayout>
    </FrameLayout>
    <View/>
</LinearLayout>
<FrameLayout>
    <LinearLayout>
        <View/>
        <FrameLayout >
            <ImageView ... />
            <ImageView .../>
            <ImageView .../>
            <LinearLayout >
                <View/>
                <LinearLayout >
                    <View />
                    <LinearLayout >
                        <LinearLayout >
                        </LinearLayout>
                        <LinearLayout >
                        </LinearLayout>
                    </LinearLayout>
                    <View/>
                </LinearLayout>
                <View/>
            </LinearLayout>
            <TextView/>
        </FrameLayout>
    </LinearLayout>
</FrameLayout>
<LinearLayout>
    <View >
    </View>
    <LinearLayout >
        <View>
        </View>
        <Button/>
        <Button/>
        <View >
        </View>
        <Button/>
        <Button/>
        <View>
        </View>
    </LinearLayout>
</LinearLayout>
<LinearLayout>
    <View/>
    <LinearLayout >
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
        <ImageView .../>
    </LinearLayout>
</LinearLayout>

`

0 个答案:

没有答案