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 - how to put the R.drawables.* into an array

how to put the R.drawables.* into an array

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

how to put the R.drawables.* into an array

Postby reynolds » Fri Mar 06, 2009 8:20 am

I'd like know which method can I use that will return all images/files that is in the R.drawables. The reason I asked coz, I want to avoid creating a fixed array, coz later I will have to add images again at R.drawables, dynamically.

Thanks,
reynolds
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Mar 06, 2009 6:13 am
Location: Makati Philippines

Top

Postby MrSnowflake » Fri Mar 06, 2009 11:08 am

Use reflection, so you can run through the values of R.drawable.

The implementation is your assignment for today, due next week :).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby reynolds » Sat Mar 07, 2009 8:20 am

MrSnowflake wrote:Use reflection, so you can run through the values of R.drawable.

The implementation is your assignment for today, due next week :).


Thanks, I'll try it as soon as possible.

Btw, I'm very new to Android, and I'm originally a C/C++/PHP programmer. It took me a day to understand Java!

So please bear with me. Thanks ^_^
reynolds
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Mar 06, 2009 6:13 am
Location: Makati Philippines

Postby reynolds » Mon Mar 09, 2009 3:32 am

argh... I'm still new to Java, as I can' understand the logic of how to use Reflection. Does anybody have an example function /method?

Thanks,
reynolds
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Mar 06, 2009 6:13 am
Location: Makati Philippines

Postby MrSnowflake » Mon Mar 09, 2009 12:17 pm

The java tutorial explain everything pretty good.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests