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

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 - [Solved] Problem with Focus

[Solved] Problem with Focus

Put your problem here if it does not fit any of the other categories.

[Solved] Problem with Focus

Postby Oleg » Fri Dec 21, 2007 11:46 am

Hi all! I have problem!I have element with focus, and when i load other element with focus in my view I can not lose focus from new element! How can I move from one element to other one?
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Top

Postby snowtiger » Fri Dec 21, 2007 12:24 pm

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. yourViewThatWantsFocus.requestFocus();
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


Note that this calls onFocusChanged() of your view, so you can do some stuff with a listener:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. yourViewThatWantsFocus.setOnFocusChangeListener(new View.OnFocusChangeListener() {
  2.  
  3.                 public void onFocusChanged(View button, boolean currentFocus) {
  4.  
  5.                         doWhatYouWantWhenThisViewHasFocusGainedOrLost();
  6.  
  7.                 }
  8.  
  9. });
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
snowtiger
Developer
Developer
 
Posts: 34
Joined: Fri Dec 21, 2007 10:44 am

Postby plusminus » Fri Dec 21, 2007 4:55 pm

Hello Oleg,

you can already do ".requestFocus" within your xml-layout, like this:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.         <Button ...>
  2.             <requestFocus/>
  3.         </Button>
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Oleg » Fri Dec 21, 2007 5:08 pm

Thanks
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests