title: How to control focus in child views in viewpager
body: <p>I am going to have some windows phone like GUI on Android.</p>
  
  <p>I use ViewPager to implement the page switching effect.
  It works well except the focus changing.</p>
  
  <p>As image below, when I pressed right key when focus on A1/B2 in page 1, the current page should switch to page 2 and focus should on A2.</p>
  
  <p><strong>All size and place of rects are placed by user, it means that I can not hard code them.</strong></p>
  
  <p>The ViewPager handles page switching very well, but the focus always on the top right when a new page enter.</p>
  
  <p>So, the question is is there any easy way to handle the focus? 
  Or I have to calculate the focus myself by pre-focus coordinates?
  Thanks!</p>
  
  <p><img src="https://i.stack.imgur.com/xRyLp.png" alt="enter image description here"></p>
  
  <p>BTW:
  The same, when I pressed right key, the focus should change as below:</p>
  
  <pre><code>C1 --&gt; B2
  D1 --&gt; C2
  </code></pre>
  
  <p>while when I pressed left key, the focus should change as below:</p>
  
  <pre><code>A2 --&gt; A1/B2 (both are OK)
  B2 --&gt; C1
  C2 --&gt; D1
  D2 --&gt; D1
  </code></pre>