Author Topic: Something strange in android  (Read 5618 times)

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Something strange in android
« on: 2011-Oct-04 »
I have an application that works properly in IOS and WebOS, however displays images and texts with strange effects in Android.

Attached image.

[attachment deleted by admin]

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Something strange in android
« Reply #1 on: 2011-Oct-04 »
Are you using USEASBMP ? Ive had a similar effect with that.

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #2 on: 2011-Oct-04 »
No, I don't use it.  :S

MrTAToad

  • Guest
Re: Something strange in android
« Reply #3 on: 2011-Oct-04 »
What resolution is set in your program and what is the resolution of the device - I suspect they aren't the same.

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #4 on: 2011-Oct-04 »
I use STRETCHSPRITE to resize the screen and GETSCREENSIZE to find the screen resolution, but i get very strange results because this command answers me  320x480 in a HTC Wildfire with a resolution QVGA (320x240).

In any case I've also tested on a single screen without resizing and I have the same result.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Something strange in android
« Reply #5 on: 2011-Oct-04 »
it looks like either a texture is "broken" (DRAWSPRITE no, 0,0 to test)
or the drawing of this texture is wrong. The error is only in the background of the info-areas?

are you using polyvector?

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #6 on: 2011-Oct-04 »
I'm not using Polyvector. The problem appears in PNG and BMP files interchangeably, however this does not happen with LOADBMP.

P.D.: Why not work well GETSCREENSIZE in Android?
« Last Edit: 2011-Oct-04 by msx »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Something strange in android
« Reply #7 on: 2011-Oct-04 »
Try to make a smaller example to see the problem, maybe in one line of code?

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #8 on: 2011-Oct-04 »
This afternoon I will do tests to give more details.

Thanks

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: Something strange in android
« Reply #9 on: 2011-Oct-04 »
I think can be error in the resolution at compiling, or ....

you have some setscreen command, I rebenmer I have a similar trouble in my android for this command.

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #10 on: 2011-Oct-05 »
I still have the same problem.

Attached two screenshots in the android emulator, choosing a HVGA resolution (320x480). In addition, using GETSCREENSIZE I get 213x320, you can see at the top of the screenshot #1. Why?.

The effects in the emulator are faithful to reality.

[attachment deleted by admin]
« Last Edit: 2011-Oct-05 by msx »

MrTAToad

  • Guest
Re: Something strange in android
« Reply #11 on: 2011-Oct-05 »
Quote
In addition, using GETSCREENSIZE I get 213x320, you can see at the top of the screenshot #1. Why
Probably because the XML forces the program to return that size...

It looks like your graphics have multiple transparency layers...

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: Something strange in android
« Reply #12 on: 2011-Oct-05 »
first at all, check AndroidManifest.xml and set android:anyDensity to true. That should return the correct resolution with GETSCREENSIZE.

Also Emulator is not very good at all, and can mess out the graphics and a lots of thing is not supported (and is slow as hell). Here POLYVECTOR was a total mess and noting works, but have works nice on two tested phones.

SETSCREEN should also not been used (not checked the code) for mobile versions.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline caffeinekid

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
    • TCKSOFT
Re: Something strange in android
« Reply #13 on: 2011-Oct-05 »
I have had a report that my Android app only shows half the screen (I think that's what they said I'm trying to clarify) on his HTC Wildfire - perhaps this is the same problem?

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Something strange in android
« Reply #14 on: 2011-Oct-05 »
It does not work.  :noggin:

The images are made with photoshop and probably have several layers of transparencies. They are saved as PNG files using the "Save for Web & Devices" option.

On the other hand, the texts are not working correctly and I'm using the UO_DiNGSFont_v4 application for generating the text  with transparent background.


I have had a report that my Android app only shows half the screen (I think that's what they said I'm trying to clarify) on his HTC Wildfire - perhaps this is the same problem?

Yes, My problem occurs in small resolutions like HTC Wildfire -320x240- (used for my test).
« Last Edit: 2011-Oct-05 by msx »