Floating App On Android (windowed App)
Does anyone know how I can create a floating window? (Image below shows what I mean) - source code I've read on various websites that in order to do so an app must be running as a
Solution 1:
The simplest way is to use the great open source Standout library: https://github.com/pingpongboss/StandOut
Solution 2:
You can use WindowManager to inflate a view. Something like this:
LayoutInflaterinflater= (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
overlay = (RelativeLayout) inflater.inflate(R.layout.overlay, null);
finalLayoutParamsparams=newLayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,
LayoutParams.TYPE_SYSTEM_ALERT,
LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_NOT_TOUCH_MODAL,
PixelFormat.TRANSLUCENT);
WindowManagerwm= (WindowManager) getSystemService(WINDOW_SERVICE);
if (overlay.isShown()){
wm.updateViewLayout(overlay, params);
}
else {
// add overlay
wm.addView(overlay, params);
}
Whit this you can inflate any view on any application.
Hope it helps you!!
Solution 3:
You might also want to check out Tooleap SDK: http://www.tooleap.com
Solution 4:
These q&a's (linked below) where helpful for achieving what i wanted:
Post a Comment for "Floating App On Android (windowed App)"