package tw.edu.ntu.csie.mhci.tapassist.utils;

import android.app.Activity;
import android.graphics.Rect;
import android.util.Log;
import android.view.Window;

public class Layout {

	public static int getStatusBar(Activity activity) {
		Rect rectgle = new Rect();
		Window window = activity.getWindow();
		window.getDecorView().getWindowVisibleDisplayFrame(rectgle);
		int StatusBarHeight = rectgle.top;
		int contentViewTop = window.findViewById(Window.ID_ANDROID_CONTENT)
				.getTop();
		int TitleBarHeight = contentViewTop - StatusBarHeight;

		Log.i("debug", "StatusBar Height= " + StatusBarHeight
				+ " , TitleBar Height = " + TitleBarHeight);
		return TitleBarHeight;
	}
}

@@ -655,29 +655,29 @@
 %09return 
-TitleBarHeight
+contentViewTop
 ;%0A%09%7D%0A%7D%0A

fix moving shift problem