當前位置: 首頁>>代碼示例>>Java>>正文


Java View.removeOnLayoutChangeListener方法代碼示例

本文整理匯總了Java中android.view.View.removeOnLayoutChangeListener方法的典型用法代碼示例。如果您正苦於以下問題:Java View.removeOnLayoutChangeListener方法的具體用法?Java View.removeOnLayoutChangeListener怎麽用?Java View.removeOnLayoutChangeListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.View的用法示例。


在下文中一共展示了View.removeOnLayoutChangeListener方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onLayoutChange

import android.view.View; //導入方法依賴的package包/類
@Override
public void onLayoutChange(View view, int left, int top, int right, int bottom,
                           int oldLeft, int oldTop, int oldRight, int oldBottom) {
    if (view.isFocused() && view instanceof TextView) {
        // A focused view changed its bounds. Follow it?
        int height = bottom - top;
        int oldHeight = oldBottom - oldTop;
        if (oldHeight != height) {
            zoomToView(view, false);
        }
    } else {
        view.removeOnLayoutChangeListener(this);
    }
}
 
開發者ID:natario1,項目名稱:ViewPrinter,代碼行數:15,代碼來源:DocumentView.java

示例2: removeViewWithSubviewClippingEnabled

import android.view.View; //導入方法依賴的package包/類
void removeViewWithSubviewClippingEnabled(View view) {
  Assertions.assertCondition(mRemoveClippedSubviews);
  Assertions.assertNotNull(mClippingRect);
  Assertions.assertNotNull(mAllChildren);
  view.removeOnLayoutChangeListener(mChildrenLayoutChangeListener);
  int index = indexOfChildInAllChildren(view);
  if (mAllChildren[index].getParent() != null) {
    int clippedSoFar = 0;
    for (int i = 0; i < index; i++) {
      if (mAllChildren[i].getParent() == null) {
        clippedSoFar++;
      }
    }
    super.removeViewsInLayout(index - clippedSoFar, 1);
  }
  removeFromArray(index);
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:18,代碼來源:ReactViewGroup.java

示例3: setPopView

import android.view.View; //導入方法依賴的package包/類
/**
 * 設置要Pop的view
 *
 * @param popView
 * @return
 */
public FPoper setPopView(View popView)
{
    final View old = mPopView;
    if (old != popView)
    {
        if (old != null)
        {
            old.removeOnLayoutChangeListener(mOnLayoutChangeListenerPopView);
        }

        mPopView = popView;

        if (popView != null)
        {
            popView.removeOnLayoutChangeListener(mOnLayoutChangeListenerPopView);
            popView.addOnLayoutChangeListener(mOnLayoutChangeListenerPopView);
        }
    }
    return this;
}
 
開發者ID:zj565061763,項目名稱:poper,代碼行數:27,代碼來源:FPoper.java

示例4: onLayoutChange

import android.view.View; //導入方法依賴的package包/類
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
                           int oldLeft, int oldTop, int oldRight, int oldBottom) {
    targets.remove(v);
    v.removeOnLayoutChangeListener(this);
    if (targets.isEmpty()) {
        listener.onLayout();
    }
}
 
開發者ID:roshakorost,項目名稱:Phial,代碼行數:10,代碼來源:LayoutHelper.java

示例5: dispose

import android.view.View; //導入方法依賴的package包/類
@Override
public void dispose() {
    for (View target : targets) {
        target.removeOnLayoutChangeListener(this);
    }
    targets.clear();
}
 
開發者ID:roshakorost,項目名稱:Phial,代碼行數:8,代碼來源:LayoutHelper.java

示例6: onViewRemoved

import android.view.View; //導入方法依賴的package包/類
@Override
public void onViewRemoved(View child) {
    super.onViewRemoved(child);
    child.removeOnLayoutChangeListener(mChildLayoutChangeListener);
}
 
開發者ID:godness84,項目名稱:react-native-recyclerview-list,代碼行數:6,代碼來源:RecyclerViewBackedScrollView.java


注:本文中的android.view.View.removeOnLayoutChangeListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。