public void onConfigurationChanged(Configuration configuration) {
   super.onConfigurationChanged(configuration);
   this.f3573e.m7110a();
   if (this.f3571c != null) {
     this.f3571c.m5698a();
   }
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   BaseApplication.getBus().post(new FragmentOnConfigurationChangedEvent());
   Timber.tag(TAG);
   Timber.d("onConfigurationChanged");
   initOnConfigurationChangedBody();
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   if (this.webView == null) {
     return;
   }
   PluginManager pm = this.webView.getPluginManager();
   if (pm != null) {
     pm.onConfigurationChanged(newConfig);
   }
 }
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);

    LayoutInflater inflater =
        (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View v = inflater.inflate(R.layout.equalizer, null);
    ViewGroup rootView = (ViewGroup) getView();
    rootView.removeAllViews();
    rootView.addView(v);
    saveViewChildren(v);

    fillViews();
  }
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    Log.d(TAG, "on change");

    if (mFolderPopupWindow != null) {
      if (mFolderPopupWindow.isShowing()) {
        mFolderPopupWindow.dismiss();
      }
    }

    mGridView
        .getViewTreeObserver()
        .addOnGlobalLayoutListener(
            new ViewTreeObserver.OnGlobalLayoutListener() {
              @Override
              @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
              public void onGlobalLayout() {

                final int height = mGridView.getHeight();

                final int desireSize = getResources().getDimensionPixelOffset(R.dimen.image_size);
                Log.d(TAG, "Desire Size = " + desireSize);
                final int numCount = mGridView.getWidth() / desireSize;
                Log.d(TAG, "Grid Size = " + mGridView.getWidth());
                Log.d(TAG, "num count = " + numCount);
                final int columnSpace = getResources().getDimensionPixelOffset(R.dimen.space_size);
                int columnWidth = (mGridView.getWidth() - columnSpace * (numCount - 1)) / numCount;
                mImageAdapter.setItemSize(columnWidth);

                if (mFolderPopupWindow != null) {
                  mFolderPopupWindow.setHeight(height * 5 / 8);
                }

                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
                  mGridView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                } else {
                  mGridView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
                }
              }
            });

    super.onConfigurationChanged(newConfig);
  }
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    // Getting the width on orientation changed
    Display display = getActivity().getWindowManager().getDefaultDisplay();
    Point size = new Point();
    display.getSize(size);
    int width = size.x;

    /**
     * Getting the orientation of the device. Set margin for pages as a negative number, so a part
     * of next and previous pages will be showed
     */
    if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
      pager.setPageMargin(-width / 2);
    } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
      pager.setPageMargin(-width / 3);
    }
    pager.refreshDrawableState();
  }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   // Forward the new configuration the drawer toggle component.
   mDrawerToggle.onConfigurationChanged(newConfig);
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   checkOrientation();
 }
Example #10
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   linearLayoutManager.setSpanCount(getSpanCount());
 }
Example #11
0
  @Override
  public void onConfigurationChanged(Configuration newConfig) {

    super.onConfigurationChanged(newConfig);
    int currentOrientation = newConfig.orientation;

    int i = 0;
    if (rv.getLayoutManager() instanceof LinearLayoutManager
        && currentOrientation == Configuration.ORIENTATION_LANDSCAPE) {
      if (rv.getAdapter() != null) {
        i = ((LinearLayoutManager) rv.getLayoutManager()).findFirstVisibleItemPosition();
      }
      final RecyclerView.LayoutManager mLayoutManager;
      if (currentOrientation == Configuration.ORIENTATION_LANDSCAPE && SettingValues.tabletUI) {
        mLayoutManager =
            new CatchStaggeredGridLayoutManager(
                Reddit.dpWidth, CatchStaggeredGridLayoutManager.VERTICAL);
      } else if (currentOrientation == Configuration.ORIENTATION_PORTRAIT
          && SettingValues.dualPortrait) {
        mLayoutManager =
            new CatchStaggeredGridLayoutManager(2, CatchStaggeredGridLayoutManager.VERTICAL);
      } else {
        mLayoutManager = new PreCachingLayoutManager(getContext());
      }

      rv.setLayoutManager(mLayoutManager);

    } else {
      final RecyclerView.LayoutManager mLayoutManager;

      if (rv.getAdapter() != null) {
        if (rv.getLayoutManager() instanceof CatchStaggeredGridLayoutManager) {
          int[] firstVisibleItems = null;
          try {
            firstVisibleItems =
                ((CatchStaggeredGridLayoutManager) rv.getLayoutManager())
                    .findFirstVisibleItemPositions(firstVisibleItems);
          } catch (Exception e) {
            firstVisibleItems = new int[] {0, 1};
          }
          if (firstVisibleItems != null && firstVisibleItems.length > 0) {
            i = firstVisibleItems[0];
          }
        } else {
          i =
              ((PreCachingLayoutManager) rv.getLayoutManager())
                  .findFirstCompletelyVisibleItemPosition();
        }
      }
      if (currentOrientation == Configuration.ORIENTATION_LANDSCAPE && SettingValues.tabletUI) {
        mLayoutManager =
            new CatchStaggeredGridLayoutManager(
                Reddit.dpWidth, CatchStaggeredGridLayoutManager.VERTICAL);
      } else if (currentOrientation == Configuration.ORIENTATION_PORTRAIT
          && SettingValues.dualPortrait) {
        mLayoutManager =
            new CatchStaggeredGridLayoutManager(2, CatchStaggeredGridLayoutManager.VERTICAL);
      } else {
        mLayoutManager = new PreCachingLayoutManager(getContext());
      }
      rv.setLayoutManager(mLayoutManager);
    }
    rv.getLayoutManager().scrollToPosition(i);
  }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   // 当系统配置改变时调用DrawerToggle的改变配置方法(例如横竖屏切换会回调此方法)
   mDrawerToggle.onConfigurationChanged(newConfig);
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   recLifeCycle(getClass(), CALL_TO_SUPER);
   super.onConfigurationChanged(newConfig);
   recLifeCycle(getClass(), RETURN_FROM_SUPER);
 }
Example #14
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   mCalculatorKeyboard =
       new CalculatorKeyboard(getActivity(), mKeyboardView, R.xml.calculator_keyboard);
 }
Example #15
0
 void m962a(Configuration configuration) {
     onConfigurationChanged(configuration);
     if (this.f773v != null) {
         this.f773v.m1410a(configuration);
     }
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   Log.d("FragmentCycle===>", "onConfigurationChanged");
   super.onConfigurationChanged(newConfig);
 }