转换XML布局使崩溃的机器人 [英] switching xml layout causes crash in Android

查看:92
本文介绍了转换XML布局使崩溃的机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要写一个Android应用程序就像一本书。我有大约100张图片,我需要与后退,前进,另一个按钮显示它们。 我试图创建一个xml布局为每个图像,并制成图片布局的背景。

I need to write an android application like a book. I have approximately 100 images and i need to show them with back, forward and another buttons. I tried to create an xml-layout for each image and made images to layout's background.

在运行的应用程序,如果I $交换XML-布局过程p $ PSS按钮快速,程序崩溃。如果我减少图像尺寸我的问题也会减少。不幸的是,我需要为了解决这个问题,因为我不能使用较小的图像大小,但我有崩溃的问题又解决方案。

While running application, if i press buttons fast, program crashes during switching xml-layout.. If i decrease image sizes my problem decreases also. Unfortunately, i need another solution in order to solve it because i cannot use smaller image-size but i have crash problem still.

推荐答案

有一种布局,用的 ImageView的在里面。然后不断变化的图像视图的源图像,当您需要循环到下一个或previous形象。

Have one layout, with an ImageView in it. Then keep changing the source image for the image view whenever you need to cycle to the next or previous image.

这篇关于转换XML布局使崩溃的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆