title: How can I find out which view currently has focus?
body: <p>My app uses keyboard control and when moving around I've noticed that occasionally you get what I'll refer to as a "Mystery View" - I say that because nothing visible <em>seems</em> to be selected, yet nothing visible is focussed either</p>
  
  <p>Is there any way to find out what I'm focussed on at any given time? eg. a listener that fires on a view selection, etc.</p>
  
  <p>Thanks</p>
  
  <p>** edit - some code for ntc **</p>
  
  <pre><code>LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
  Button btn = new Button(this);
  btn.setOnClickListener(new OnClickListener() {
      public void onClick(View v) {
          LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
          if(col1.getFocusedChild() != null) {
              Log.d(TAG, col1.getFocusedChild().toString());
          }
      }
  });
  col1.addChild(btn);
  </code></pre>