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 - variable drawable resource

variable drawable resource

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

variable drawable resource

Postby rellik1982 » Mon Mar 30, 2009 12:31 pm

Hello everybody !

For my first post on this very good forum, i'd like to know if is possible to get a resource (drawable) dynamically.

Example of what i want to do :

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String var = "image1";
  2.  
  3. getResource().getDrawable(R.drawable.var) // => i would load the image1
Parsed in 0.020 seconds, using GeSHi 1.0.8.4


so for var = "image42", i would load the image42...

But I can't use R.drawable.var, indeed the image var.png does not exist ;)

Is it possible to do such a thing, and how ?

Thanks in advance
rellik1982
Freshman
Freshman
 
Posts: 8
Joined: Mon Mar 30, 2009 12:24 pm

Top

Postby rellik1982 » Thu Jun 04, 2009 12:10 pm

rellik1982
Freshman
Freshman
 
Posts: 8
Joined: Mon Mar 30, 2009 12:24 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests