/**
  * @see android.view.View#onLayout(boolean,int,int,int,int)
  *     <p>Creates and positions all views
  */
 @Override
 protected void onLayout(boolean changed, int l, int t, int r, int b) {
   super.onLayout(changed, l, t, r, b);
   mInLayout = true;
   layout(0, false);
   mInLayout = false;
 }
コード例 #2
0
ファイル: LeftGallery.java プロジェクト: zixinliuyun/GBF
  @Override
  protected void onLayout(
      final boolean changed, final int l, final int t, final int r, final int b) {
    super.onLayout(changed, l, t, r, b);

    /*
     * Remember that we are in layout to prevent more layout request from
     * being generated.
     */
    mInLayout = true;
    layout(0, false);
    mInLayout = false;
  }