本文整理匯總了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);
}