レイアウト変更は、アプリからは実施を要求するだけで、実際の変更はフレームワークがタイミングを見計らって行うようです。
変更自体はView#onLayoutで検知できますが、リスナーは存在しないようです。
ImageViewを継承したカスタムViewを作成し、自分でリスナーを実装するのが良いと思います。
(例)
・カスタムView
public class MyImageView extends ImageView {
public MyImageView(Context context) { super(context); }
public MyImageView(Context context, AttributeSet attrs) {
super(context, attrs); }
public MyImageView(Context context, AttributeSet attrs, int defStyle)
{ super(context, attrs, defStyle); }
@Override
protected void onLayout(boolean changed, int left, int top, int right,
int bottom) {
super.onLayout(changed, left, top, right, bottom);
if (changed && mLayoutChangeListner != null) {
mLayoutChangeListner.onLayoutChange(this, left, top, right, bottom);
}
}
OnLayoutChangeListner mLayoutChangeListner = null;
public void setOnLayoutChangeListner(OnLayoutChangeListner listner) {
mLayoutChangeListner = listner;
}
public interface OnLayoutChangeListner {
public void onLayoutChange(MyImageView view, int left, int top, int
right, int bottom);
}
}
・XMLの指定
<com.example.MyImageView android:id=... />
・使い方
myImageView.setOnLayoutChangeListner(new MyImageView.OnLayoutChangeListner() {
@Override
public void onLayoutChange(MyImageView view, int left, int top, int
right, int bottom) {
// 何かの処理
}
});
2010年7月12日19:33 55555 <tachi...@gmail.com>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このグループに投稿するには、android-g...@googlegroups.com にメールを送信してください。
> このグループから退会するには、android-group-j...@googlegroups.com にメールを送信してください。
> 詳細については、http://groups.google.com/group/android-group-japan?hl=ja からこのグループにアクセスしてください。
>
>
--
千葉 史哉
f-c...@broadtai.jp