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

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

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 - Background of View non-scaled?

Background of View non-scaled?

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

Background of View non-scaled?

Postby TheChosen » Mon Aug 03, 2009 2:10 pm

By setting the background drawable of a View this background image gets stretched automatically to fill the space of the View.

Is there a way to prevent this stretching behaviour? I would like to keep the size of the image and have it centered in the background of the View.
TheChosen
Experienced Developer
Experienced Developer
 
Posts: 62
Joined: Tue Jan 06, 2009 7:18 pm
Location: Germany

Top

Postby Emmanuel7 » Mon Aug 03, 2009 11:34 pm

Hi,

Some time ago, I was wondering about something quite similar : how to prevent the stretching behaviour, but what I wanted was to repeat the background, not to have it centered.

I don't fully remind everything, so I don't know how to have a centered background image, but you can find about my solution to have a tiled background here on my blog :
http://androidblogger.blogspot.com/2009/01/how-to-have-tiled-background.html
http://androidblogger.blogspot.com/2009/01/how-to-have-tiled-background-cont.html

Hope it can be a base for help,
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby arams » Tue Aug 04, 2009 7:36 am

Thanks Emmanuel....

when i try your (blogspot refer) code i got some errors....could you post the correct code in this page to referrence....
Thanks Again
arams
Experienced Developer
Experienced Developer
 
Posts: 89
Joined: Fri May 08, 2009 7:45 am

Postby Emmanuel7 » Tue Aug 04, 2009 5:02 pm

Hi,


My code was certainly for Android 1.1, so it may not be working anymore, but some replacement functions should exist.

But for the XML part ( the 2nd link I gave ), it is exactly what I have in my game "Word Prospector", and it's still in place, and still working OK !
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests