【发布时间】:2016-10-24 15:51:44
【问题描述】:
我正在开发一个应用程序,该应用程序应该显示您在外部存储中拥有的所有图像。这是一款仅用于研究工作的应用程序,而不是最终产品。
我遇到的问题是应用程序会显示一些图像,直到出现内存不足错误。
有没有一种方法可以有效地处理图像?或避免该错误?
我在这里发布我的 main-page.xml
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="onPageLoaded">
<ListView id="listview" items="{{ myItems }}">
<ListView.itemTemplate>
<StackLayout orientation="horizontal">
<Image src="{{ src }}" class="imagebox" stretch="none" />
</StackLayout>
</ListView.itemTemplate>
</ListView>
</Page>
我有一个放置每个图像路径的数组。
【问题讨论】:
标签: image android-image nativescript