ScrollView and OnFocusChangeListener problem.

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

ScrollView and OnFocusChangeListener problem.

Postby x-files » Mon Feb 04, 2008 4:49 pm

Why not call OnFocusChangeListener on ScrollView when focus of this view changed.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     ScrollView scrollView = (ScrollView)findViewById(R.id.task_scroll_view);
  2.  
  3.     scrollView.setFocusable(true);
  4.  
  5.     scrollView.setOnFocusChangeListener(FOCUS_LISTENER);
  6.  
  7.  
  8.  
  9.     OnFocusChangeListener FOCUS_LISTENER = new  OnFocusChangeListener(){
  10.  
  11.         public void onFocusChanged(View view, boolean hasFocus) {
  12.  
  13.             ... not once ...
  14.  
  15.         }
  16.  
  17.     };
  18.  
  19.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


If I use ListView instead of ScrollView focus listener invoked without problem.
x-files
Developer
Developer
 
Posts: 44
Joined: Fri Jan 11, 2008 10:27 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 35 guests