There's an Android Application called Smart Taskbar that manages to Pin a small SemiTransparent Icon over the screen...The icon remains visible over ALL the activites (including the home screen). The Icon is Clickable (/Touchable), and it does popopen a Small Popup window which the user can interact with.
I'm very interested in how this is done? I think it's something to with PopupWindow.
Any ideas? Thanks in Advance.
I recently experimented with this.
See this question: Creating a system overlay window (always on top) - the solution is virtually the same, but you need to set TYPE_SYSTEM_ALERT in the layout params instead of TYPE_SYSTEM_OVERLAY.
Related
I'm trying to do an Accessibility Service where the purpose it's to create some "layer" between the user when he touches the screen and the tap.
For example : when I touch the screen I when to double tap at this precise position I touch the Screen.
I think, but I'm really open to suggestion, that I will have to create an invisible layout that will cover all the screen where a would be able to activate an onTouchListener to get the position and use my accessibility service to create gesture and transfer the touch behind the layout to click anywhere.
As far I only found a solution for Android 4.1 or less.
I also want to use a kind of cursor, the app Open Sesame do it well and the cursor can go over the navigation bar and interact with.
I also found the open source project Eva facial mouse but they don't perform complex gesture and don't go over the navigation bar.
So my big question is, I am in the right way by wanting to create an invisible layout to detect touch even on the navigation bar and is there someone would help me to enlighten my search in the right direction.
I succeed in putting an overlay layout over the status bar, just add the right Flags to your LayoutParams.
For my case I use: FLAG_FULLSCREEN, FLAG_LAYOUT_IN_SCREEN and FLAG_LAYOUT_NO_LIMITS.
I am trying to write an app that draws a custom mouse pointer. I currently have a service that creates a class that extends ViewGroup and uses the WindowManager system service to display it as a TYPE_SYSTEM_OVERLAY with the FLAG_LAYOUT_IN_SCREEN set.
This almost works. On my tablet (Samsung Galaxy Tab 7.7) and in the emulator set to tablet mode, it is laid above everything except the bottom status bar (with the soft home, back keys and the notification area). In the emulator, there are no software buttons on screen, but it is laid on top of the notification bar.
I've also tried the solution in: TYPE_SYSTEM_OVERLAY in ICS but I got the same results.
Is there a way to truly draw on top of everything?
I have previously used System Overlays to achieve something similar, and can unfortunately tell you that it isn't possible.
You can overlay on top of the entire normal screen area, and over the notification bar if it isn't clubbed with the system bar at the bottom (as is the case in some tablets). Beyond that, it seems to be impossible to overlay on top of the System Bar software buttons.
I am programming an Android app and it seems to work well, but when the user presses the 'home' button, and after returns to the app, the activity has changed his position some pixels, and due to this some buttons are hidden.
It only happens in some phone models , and only with visual effects enabled on the operating system.
It seems that the activity is drawn before the top bar of Android dissapears (the bar with the battery info, wifi... etc), and the activity starts to draw under the place of this bar.
What can be happening? how can I solve it?
Thank you very much!
PD: I am using a relative layout on this activity, and some layouts inside placed at top and bottom.
PD2: I forgot to tell that the app is in "no tittle bar and fullscreen".
The Android app Thrutu puts a drawer on top of the in call screen which has several functions and only takes up a fraction of the screen. The call control buttons below still are fully functional. Even a transparent activity would not allow this behaviour. Any idea on how to implement this?
The trick to making the underlying buttons work is to implement the UI using a Service rather than an Activity, make the Window you add (using WindowManager.addView) one of the higher-priority types (e.g. TYPE_PHONE), then use FLAG_NOT_TOUCH_MODAL.
I think you need android.permission.SYSTEM_ALERT_WINDOW.
Take a look at How to display a fullscreen TYPE_SYSTEM_ALERT window? and in particular Creating a system overlay where the home buttons still work?
There should be a bunch of buttons on dark gray background right of the phone screen. I started playing with the keyboard shortcuts available in that window and I must have done something to make the whole right-hand side of the emulator window disappear. How do I restore it?
This may be of help: http://www.android.encke.net/android-emulator-tutorial.html - Ctrl-F11/F12 may get you back in order.