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
[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 - Set Single Choice Items problem

Set Single Choice Items problem

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

Set Single Choice Items problem

Postby Helios » Sun May 24, 2009 2:16 am

Hi to all. If I have an array of strings, example: String [] array = {"moon", "sun", "earth"};
Is it possible to use setSingleChoiceItems() to create a single choice dialog that shows the strings in the array as options? How can this be done? Thanks in advance.

Regards.
Helios
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sat Jan 17, 2009 7:11 am

Top

Postby divestoclimb » Tue Jun 02, 2009 2:29 am

You need to create an ArrayAdapter and bind it to the type of View you want to use to display the choices. The best options would be a single-choice ListView or a Spinner, depending on how much space you have to work with.

The Android API demos do this exact thing in the Spinner example.
divestoclimb
Developer
Developer
 
Posts: 33
Joined: Mon May 11, 2009 7:46 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests