解决方法
如何实现由于布局更改而移动视图时调用的OnLayoutChangeListener
new View().addOnLayoutChangeListener(new OnLayoutChangeListener() { @Override public void onLayoutChange(View v,int left,int top,int right,int bottom,int oldLeft,int oldTop,int oldRight,int oldBottom) { // TODO Auto-generated method stub } });
摘自Android API:
Add a listener that will be called when the bounds of the view change due to layout processing.