0

--tt.xml

<ViewFlipper android:layout_weight="36"
android:id="@+id/viewcontainer" android:measureAllChildren="true" 
    android:layout_width="fill_parent" android:layout_height="80dp"
android:persistentDrawingCache="animation"  android:flipInterval="500">
<include layout="@layout/remotecontrol_pv_layout" />                
<include layout="@layout/remotecontrol_number_layout" />
<include layout="@layout/voicecontrol_layout" />
<include layout="@layout/mousecontrol_layout" />
<include layout="@layout/keyboardcontrol_layout" />
</ViewFlipper>

----在activity.java setContentView(R.layout.tt);当我调试这个程序时,程序就死了,没有日志,没有错误,没有异常,然后我像这样更改代码,一样,测试是否有问题:

<ViewFlipper android:layout_weight="36"
android:id="@+id/viewcontainer" android:measureAllChildren="true" 
    android:layout_width="fill_parent" android:layout_height="80dp"
android:persistentDrawingCache="animation"  android:flipInterval="500">
<include layout="@layout/remotecontrol_pv_layout" />                
<include layout="@layout/remotecontrol_pv_layout" />
<include layout="@layout/remotecontrol_pv_layout" />
<include layout="@layout/remotecontrol_pv_layout" />
<include layout="@layout/remotecontrol_pv_layout" />
</ViewFlipper>

---这次效果很好。为什么?

4

1 回答 1

0

成功了!OOM错误,内存不足,布局过多

于 2012-12-07T02:12:13.017 回答