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 - ArrayAdapter

ArrayAdapter

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

ArrayAdapter

Postby gerry013 » Sun Feb 07, 2010 12:06 pm

Hi,

I'm using simple_list_item_1 to display the data.

Now I would like to use activity_list_item layout to show the list of items with an icon on each row.

I have this code:

int layoutID = android.R.layout.activity_list_item;
aa = new ArrayAdapter<MyString>(this, layoutID , my_strings);
my_stringsListView.setAdapter(aa);

MyStrings class contain the toString with the data I would like to use with the code:

public String toString() {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
String dateString = sdf.format(date);
return my_image_id + " \t"+ dateString + " \t" + details;
}

How I must pass the icon using the toString ?
I tryed adding:
return R.drawable.icon1 + " \t"+ dateString + " \t" + details;
But it dosen't work

Many thanks!
gerry013
Freshman
Freshman
 
Posts: 3
Joined: Fri Aug 28, 2009 2:35 pm

Top

Postby Bear » Mon Feb 08, 2010 5:19 pm

You should convert integer value of ID to string
Bear
Junior Developer
Junior Developer
 
Posts: 15
Joined: Fri Jan 22, 2010 3:50 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests