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 - How to use setContentView more than once

How to use setContentView more than once

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to use setContentView more than once

Postby HennaMullaji » Thu Feb 11, 2010 5:38 pm

Hello I am new to android development and have started experimenting with it from the last two mnths.
I am writing a code where i need to display a spinner as well as a piechart on the same page(i.e same screen one below the other).
As we can use setContentView only once in onCreate method...i was wondering as to how will I be able to display two things at a time .
Any help with code snippet will be useful.

Thanks in advance,
H
HennaMullaji
Freshman
Freshman
 
Posts: 5
Joined: Thu Feb 11, 2010 4:57 am

Top

Postby Strategy » Sat Feb 20, 2010 11:14 pm

Just create a layout with both a spinner and piechart.

That aside, you can easily use setContentView multiple times (e.g., have a button change the setContentView). Just remember that changing views nulls references to buttons, etc. on the destroyed layout.
Strategy
Freshman
Freshman
 
Posts: 8
Joined: Thu Jun 18, 2009 11:00 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 5 guests