title: How to check if view inside a dialog is focused?
body: <p>I have a Alert dialog box  with two <strong>SearchView</strong> Widgets like this:</p>
  
  <p>Layout file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;SearchView
          android:id="@+id/sourceSearchView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:iconifiedByDefault="false" &gt;
      &lt;/SearchView&gt;
  
      &lt;SearchView
          android:id="@+id/destinationSearchView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" 
          android:iconifiedByDefault="false"&gt;
      &lt;/SearchView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and in below code I inflated this layout to get dialog:</p>
  
  <pre><code>LayoutInflater mInflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                  View mView = mInflater.inflate(R.layout.search_layout,null);
  
                  mSourceSearchView = (SearchView)mView.findViewById(R.id.sourceSearchView);
  
                  mDestinationSearchView = (SearchView)mView.findViewById(R.id.destinationSearchView);
  
                  mSourceSearchView.setQuery(mCurrentLocation, false);
  
  
                  mBuilder = new AlertDialog.Builder(new ContextThemeWrapper(mContext, 
                          android.R.style.Theme_DeviceDefault_Dialog));
  
                  mBuilder.setView(mView);
  
                  mAlertDialog = mBuilder.create();
  
                  mAlertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  
                  mAlertDialog.setCancelable(false);
  </code></pre>
  
  <p><strong>My Question:</strong> How to check if one searchview is focused and same for other.
  I tried with this but it returns <strong>null</strong></p>
  
  <pre><code>mAlertDialog.getWindow().getCurrentFocus().isFocused()
  </code></pre>