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 - ImageView setalpha not working

ImageView setalpha not working

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

ImageView setalpha not working

Postby BGH » Sat Sep 12, 2009 5:18 am

I would have thought this would be quite simple but for some reason it just isnt working. All I want to do is change the transparency of an ImageView.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. ivLeagueBall = new ImageView(this);
  2.  
  3. ivLeagueBall.setBackgroundResource(R.drawable.league_ball1);
  4.  
  5. layout.addView(ivLeagueBall, lp);
  6.  
  7. ivLeagueBall.setAlpha(10);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


But for some reason the alpha isnt changing. Any ideas?
User avatar
BGH
Junior Developer
Junior Developer
 
Posts: 23
Joined: Thu Feb 12, 2009 3:51 am
Location: Melbourne, Australia

Top

Postby BGH » Sat Sep 12, 2009 7:10 am

Stupid me. My girlfriend came round and as I was talking her through it to explain to her why I was so frustrated I realised I was using setBackgroundResource instead of setImageResource.

Works now :)
User avatar
BGH
Junior Developer
Junior Developer
 
Posts: 23
Joined: Thu Feb 12, 2009 3:51 am
Location: Melbourne, Australia

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests