title: Android TV control focus from imageViewA in fragmentA to another imageViewB in fragmentB
body: <p>I am building an app for Google TV ，I Have a FragmentActivity ActivityA , and three Fragment FragmentA 、FragmentB 、FragmentC，in each fragment there are some ImageView. </p>
  
  <p>Just as the pic shows below:</p>
  
  <p><a href="http://drp.io/files/541275c964ae0.png" rel="nofollow">http://drp.io/files/541275c964ae0.png</a></p>
  
  <p>MainActivityGameLTV2 ：</p>
  
  <pre><code>public class MainActivityGameLTV2 extends FragmentActivity{
  
  private static final String TAG ="MainActivityGameLTV2";
  private WoDouViewPager mViewPager;
  
  //记录当前选中位置
  private int currentIndex;
  
  //主页页面数量
  private static final int PAGE_NUMBER = 3;
  
  private ArrayList&lt;Fragment&gt; fragments = new ArrayList&lt;Fragment&gt;();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      this.setContentView(R.layout.main_activity_game_lt_v2);
  
      initView();
  
      initData();
  
  }
  
  private void initData() {
      initFragment();
  }
  
  private void initView() {
      mViewPager = (WoDouViewPager) this.findViewById(R.id.view_pager_game_v2); 
  }
  
  /**
   * 初始化Fragment
   */
  private void initFragment() {
      fragments.clear();//清空
      int count = PAGE_NUMBER;
  
      MainGameLeftFragment fragmentLeft = new MainGameLeftFragment();
      MainGameMiddleFragment fragmentMiddle = new MainGameMiddleFragment();
      MainGameRightFragment fragmentRight = new MainGameRightFragment();
      fragments.add(fragmentLeft);
      fragments.add(fragmentMiddle);
      fragments.add(fragmentRight);
  
      MainActivityGameLTV2FragmentAdapter mAdapter = new MainActivityGameLTV2FragmentAdapter(getSupportFragmentManager(), fragments);
      mViewPager.setAdapter(mAdapter);
      mViewPager.setOnPageChangeListener(pageListener);
      mViewPager.setCurrentItem(1);// 共三页设置第二页居中
  }
  
  /**
   * ViewPager切换监听方法
   */
  public ViewPager.OnPageChangeListener pageListener = new ViewPager.OnPageChangeListener() {
  
      @Override
      public void onPageScrollStateChanged(int arg0) {
      }
  
      @Override
      public void onPageScrolled(int arg0, float arg1, int arg2) {
      }
  
      @Override
      public void onPageSelected(int position) {
          mViewPager.setCurrentItem(position);
      }
    };
  }
  </code></pre>
  
  <p>view_pager_game_v2.xml:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent"&gt;
  &lt;ViewPager
          android:background="@drawable/wodou_bj"
          android:id="@+id/view_pager_game_v2"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>MainActivityGameLTV2FragmentAdapter ：</p>
  
  <pre><code>public class MainActivityGameLTV2FragmentAdapter extends FragmentPagerAdapter {
      private ArrayList&lt;Fragment&gt; mFragments;
      private FragmentManager fm;
  
      public MainActivityGameLTV2FragmentAdapter(FragmentManager fm,ArrayList&lt;Fragment&gt; fragments) {
          super(fm);
          mFragments = fragments;
          this.fm=fm;
      }
  
      @Override
      public Fragment getItem(int i) {
          return mFragments.get(i);
      }
  
      @Override
      public int getCount() {
          return mFragments.size();
      }
  }
  </code></pre>
  
  <p>MainGameRightFragment :FragmentA:</p>
  
  <pre><code>public class MainGameRightFragment extends WoDouGameBaseFragment{
  
  ImageView mIv_01;
  ImageView mIv_02;
  ImageView mIv_03;
  ImageView mIv_04;
  ImageView mIv_05;
  ImageView mIv_06;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View view = LayoutInflater.from(getActivity()).inflate(R.layout.main_game_right_fragment, null);
  
      initView(view);
      return view;
  }
  
  private void initView(View view) {
      mIv_01 = (ImageView) view.findViewById(R.id.wodou_01);
      mIv_02 = (ImageView) view.findViewById(R.id.wodou_02);
      mIv_03 = (ImageView) view.findViewById(R.id.wodou_03);
      mIv_04 = (ImageView) view.findViewById(R.id.wodou_04);
      mIv_05 = (ImageView) view.findViewById(R.id.wodou_05);
      mIv_06 = (ImageView) view.findViewById(R.id.wodou_06);
  
      mIv_01.setOnFocusChangeListener(mFocusChangeListener);
      mIv_02.setOnFocusChangeListener(mFocusChangeListener);
      mIv_03.setOnFocusChangeListener(mFocusChangeListener);
      mIv_04.setOnFocusChangeListener(mFocusChangeListener);
      mIv_05.setOnFocusChangeListener(mFocusChangeListener);
      mIv_06.setOnFocusChangeListener(mFocusChangeListener);
  
      }
   }
  </code></pre>
  
  <p>main_game_right_fragment.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical"&gt;
  
  &lt;LinearLayout
          android:orientation="horizontal"
          android:id="@+id/titleview_myapps_about"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
  &lt;/LinearLayout&gt;
  
  &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.04"
          android:gravity="center"
          &gt;
  
      &lt;ImageButton
              android:id="@+id/wodou_01"
              android:layout_width="206dp"
              android:nextFocusRight="@+id/wodou_02"
              android:layout_height="205dp"
              android:layout_marginBottom="6dp"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_01"
              android:tag="#FF666666"
              android:layout_marginRight="23dp"
              android:alpha="255"/&gt;
      &lt;ImageButton`enter code here`
              android:id="@+id/wodou_04"
              android:layout_width="206dp"
              android:layout_height="205dp"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_04"
              android:tag="#FF666666"
              android:layout_alignTop="@+id/wodou_05"
              android:layout_alignLeft="@+id/wodou_01"/&gt;
  
  
      &lt;ImageButton
              android:id="@+id/wodou_02"
              android:layout_width="446dp"
              android:layout_height="420dp"
              android:layout_marginLeft="10dp"
              android:nextFocusRight="@+id/wodou_03"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_02"
              android:tag="#FF666666"
              android:layout_alignTop="@+id/wodou_01"
              android:layout_toRightOf="@+id/wodou_04"/&gt;
  
      &lt;ImageButton
              android:id="@+id/wodou_03"
              android:layout_width="423dp"
              android:layout_height="205dp"
              android:layout_marginLeft="10dp"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_03"
              android:tag="#FF666666"
              android:layout_alignTop="@+id/wodou_02"
              android:layout_toRightOf="@+id/wodou_02"/&gt;
      &lt;ImageButton
              android:id="@+id/wodou_05"
              android:layout_width="206dp"
              android:layout_height="205dp"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_05"
              android:tag="#FF666666"
              android:layout_alignBottom="@+id/wodou_02"
              android:layout_alignLeft="@+id/wodou_03"/&gt;
  
      &lt;ImageButton
              android:id="@+id/wodou_06"
              android:layout_width="206dp"
              android:layout_height="205dp"
              android:background="@drawable/sharp_background"
              android:scaleType="fitXY"
              android:src="@drawable/wodou_game_06"
              android:tag="#FF666666"
              android:layout_alignTop="@+id/wodou_05"
              android:layout_alignRight="@+id/wodou_03"/&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Now i use D-pad move my focus from ImageView IV_2 in FragmentA to IV_7 in FragmentB,however it do not work as I want .More often when I use D-pad move focus from IV_2 , the focus goes to IV_8 or other imageView in FragmentB！ </p>
  
  <p>For this I use android:nextFocusRight to specify the next focus right view ,but it do not work.</p>
  
  <p>How can i control focus when i focused at IV_2 in FragmentA move to IV_7 in FragmentB ?</p>