Hi,
I want to have a transparent view, above my application.
I want to do this just knowing the current activity.
I found a way of doing this by adding a new framelayout via the windowManager
I m doing this :
public static void AddViewAbove(Activity activity) {
FrameLayout newLayout = new FrameLayout(activity);
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.TYPE_APPLICATION,
// if I let WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
// then touchevent are passed to the application behind, but I cant handle touch in
// my new frameLayout
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT);
activity.getWindowManager().addView(newLayout , lp);
}
My main problem now is that i can't receive touchevent correctly in my new FrameLayout and in the same time in application behind my view.
Can you help me ??
Thanks a lot,
Have a nice day
Victor