本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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();
}
}
示例5: dispose
import android.view.View; //导入方法依赖的package包/类
@Override
public void dispose() {
for (View target : targets) {
target.removeOnLayoutChangeListener(this);
}
targets.clear();
}
示例6: onViewRemoved
import android.view.View; //导入方法依赖的package包/类
@Override
public void onViewRemoved(View child) {
super.onViewRemoved(child);
child.removeOnLayoutChangeListener(mChildLayoutChangeListener);
}