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 - Changing menu items based on what layout is being used

Changing menu items based on what layout is being used

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

Changing menu items based on what layout is being used

Postby kutch » Tue Apr 28, 2009 7:26 pm

I'm trying to change my menu for my application when I go to the 'settings' layout from my 'main window' layout. For example, in my 'main window' layout, there is a menu item called "settings". When clicked, it will go to the settings layout and I no longer want that option in my menu.

I am trying to remove this menu item based on what view I'm in as follows, but it always seems to believe it's true no matter what layout Id I compare the current one with:

Code: Select all

@Override
public boolean onPrepareOptionsMenu(final Menu menu) {       
   if(this.getCurrentFocus() == this.findViewById(R.layout.settings)){
      Log.d("DEBUG", "IN SETTINGS VIEW");
   }
   else{
      Log.d("DEBUG", "NOT IN SETTINGS VIEW");
   }
    return super.onPrepareOptionsMenu(menu);
}
kutch
Freshman
Freshman
 
Posts: 5
Joined: Tue Apr 28, 2009 7:12 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests