Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Problem with Bitmap scalling in Landscape mode

Problem with Bitmap scalling in Landscape mode

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem with Bitmap scalling in Landscape mode

Postby andreleitao » Thu Mar 26, 2009 8:53 pm

Hi there,

I'm trying to scale a Bitmap object for Landscape mode on emulator. The code to create and scale the bitmap is placed below:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mBackgroundImage = BitmapFactory.decodeResource(res, R.drawable.background);
  2.  
  3. mBackgroundImage = mBackgroundImage.createScaledBitmap(
  4.  
  5.                                 mBackgroundImage,
  6.  
  7.                                 display.getWidth(),
  8.  
  9.                                 display.getHeight(),
  10.  
  11.                                 true);
Parsed in 0.015 seconds, using GeSHi 1.0.8.4


Look at the parameter display.getHeight(). It should return the actual screen height, right? But it does not. The display.getWidth() parameter works fine. The bitmap's width is perfect, but its height is out of the screen. I don't understand. Is a display.getHeight() bug? If I change display.getHeight() for 220 the bitmaps height becomes correct. :? E.g.:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mBackgroundImage = BitmapFactory.decodeResource(res, R.drawable.background);
  2.  
  3. mBackgroundImage = mBackgroundImage.createScaledBitmap(
  4.  
  5.                                 mBackgroundImage,
  6.  
  7.                                 display.getWidth(),
  8.  
  9.                                 220,
  10.  
  11.                                 true);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4



Have someone been seen this problem before?

Thanks!
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Postby andreleitao » Thu Mar 26, 2009 9:41 pm

:oops: :oops: :oops:

Now I can see that my application is not in FULLSCREEN mode. There is a reserved space for device clock bar and the application title. :P

Then... the problem is solved!

:)
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests