Hello,
I am having a issue in trying to load a whole heap of images on the page..
When I run my app it will load 20 images in a scrollview and then when the user presses the Next button it will load another 20 images to the end like a list..
Problem I am having is when there is approx 120 images added (and each of the images are the same) I get the following error in the Log:
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Then my App crashes and says it's not responding and closes.
(The above happens on both my Samsung Galaxy S2 (Running Android 4.1.2) and Samsung Galaxy S2 4G (Running Android 2.3)
However, when testing my app on a Sony Xperia Z (Running Android 4.2.2) it works fine and doesn't crash.
My guess is that my Samsung phones don't have as powerful processer and don't have as much RAM as my Sony phone or could there be some type of error I have?
I have a panel I designed in the designer and that panel has a 2 labels, 3 images.
I am adding this panel using the following:
Like I said it crashes after adding approx. 120 panels with the above in each.
I am having a issue in trying to load a whole heap of images on the page..
When I run my app it will load 20 images in a scrollview and then when the user presses the Next button it will load another 20 images to the end like a list..
Problem I am having is when there is approx 120 images added (and each of the images are the same) I get the following error in the Log:
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Then my App crashes and says it's not responding and closes.
(The above happens on both my Samsung Galaxy S2 (Running Android 4.1.2) and Samsung Galaxy S2 4G (Running Android 2.3)
However, when testing my app on a Sony Xperia Z (Running Android 4.2.2) it works fine and doesn't crash.
My guess is that my Samsung phones don't have as powerful processer and don't have as much RAM as my Sony phone or could there be some type of error I have?
I have a panel I designed in the designer and that panel has a 2 labels, 3 images.
I am adding this panel using the following:
B4X:
MyScrollView.Panel.AddView(new_pnl, 10dip, 100dip, 100%x -20dip, 50dip)
new_pnl.LoadLayout("my_layout")
Like I said it crashes after adding approx. 120 panels with the above in each.