-1

I have an application, I have created a custom view and implement onDraw Myself, The application take some bitmaps and draw them as list with some algorithm

I have used 9 item to test it and it works perfect, when I increase the number of items to 18 item and try to test, it draw item when I use portrait mode but draw nothing on landscape mode

It works on the following devices :

Samsung (GT-I5510) with 2.2 OS

Samsung (GT-S6500D) with 2.3.6 OS

HTC (Nexus One) with 2.3.6 OS

Sony (Xperia-ST23i) with 4.0.4 OS

TouchMate Tablet

it have a strange behavior in the following devices:

Samsung (Tablet GT-P3100, S2, S4) it show the drawing on portrait mode but it doesn't show it in landscape mode

HTC (OneX) it doesn't show drawing in portrait or landscape

I have the following warning show in Logcat

Bitmap too large to be uploaded into a texture (Tablet) Reached here in cacheGlyph

Can any one help please ? I think it may be something related to hardware

Kara
  • 6,115
  • 16
  • 50
  • 57
Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175

1 Answers1

0

You should try turning off the hardware acceleration. This will explain everything you need to know about hardware acceleration: http://developer.android.com/guide/topics/graphics/hardware-accel.html

GareginSargsyan
  • 1,877
  • 15
  • 23
  • it works after I turn off hardware acceleration in all devices except HTC (OneX) it doesn't show drawing in portrait or landscape, can you help me as I don't know what is the problem of this device – Amira Elsayed Ismail Dec 26 '13 at 09:40
  • Do you get the same 'Bitmap too large to be uploaded into a texture' log? Also, it would be nice if you post your code. – GareginSargsyan Dec 26 '13 at 10:13
  • yes I'm geeting this error : Bitmap too large to be uploaded into a texture (696x2262, max=2048x2048) – Amira Elsayed Ismail Dec 26 '13 at 14:31
  • I have found some posts about this problem in the following links http://stackoverflow.com/questions/7428996/hw-accelerated-activity-how-to-get-opengl-texture-size-limit , http://stackoverflow.com/questions/15313807/android-maximum-allowed-width-height-of-bitmap, I have tries to force openGL to maximize the limitation of Bitmap but it doesn't work in my device, so do you think I have to work in low level of openGL, or just try to get max bitmap size and then resize it – Amira Elsayed Ismail Dec 26 '13 at 15:42
  • You can break the large bitmap into smaller pieces and load them into individual bitmaps. That way you wan't exceed the size limit. – GareginSargsyan Dec 26 '13 at 21:27