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 - setCurrentTab not working

setCurrentTab not working

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

setCurrentTab not working

Postby theblitz » Thu Jul 19, 2012 8:54 am

For some reason setCurrentTab is not switching tabs after the first time. This is the code that I use.

Code: Select all
private OnClickListener buttonListener = new OnClickListener(){

    @Override
    public void onClick(View v) {
        tabHost.setCurrentTab(Integer.parseInt((String) v.getTag()));

    }
};


It is connected to buttons each of which have a tag that equals the number of of tab to be shown. When the button is clicked the first time and this method is called then the tab shows up. I can also see that it executes the code that creates the tab contents.

However, once a tab has been shown once and I have moved to another one, clicking back to it doesn't work. The method is definitely called and the tag is also correct. I put in commands to print to the log to confirm that. Also, it works first time round so must be okay.

Any idea?
theblitz
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Feb 18, 2011 9:11 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests