package com.gh.common.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;

public class KeyboardLayout extends RelativeLayout {

	private OnKeyboardChangedListener mListener;

	public KeyboardLayout(Context context) {
		super(context);
		
	}

	public KeyboardLayout(Context context, AttributeSet attrs) {
		super(context, attrs);
		
	}

	@Override
	protected void onSizeChanged(int w, int h, int oldw, int oldh) {
		
		super.onSizeChanged(w, h, oldw, oldh);
		if (mListener != null) {
			mListener.OnKeyboardChanged(w, h, oldw, oldh);
		}
	}

	public interface OnKeyboardChangedListener {
		void OnKeyboardChanged(int w, int h, int oldw, int oldh);
	}

	public void setOnKeyboardChangedListener(OnKeyboardChangedListener listener) {
		this.mListener = listener;
	}

}
