I have seen apps like Gamekiller and Scramble Cheat that shows partially over another app like a shadow and the touch events over them actually works over the background app.
NO don't use transparent background use a service like this example it explains it well and could take you in the right direction.
http://www.piwai.info/chatheads-basics/
Or you could use standout.
https://github.com/pingpongboss/StandOut
I haven't tried standout yet but it looks good.
You can add own view to screen (WindowManager.addView). But in need permission SYSTEM_ALERT_WINDOW.
Or, better, create custom dialog with custom LayoutParams. Must important - set type to TYPE_PHONE or TYPE_SYSTEM_ALERT.
It display over other app.
Related
I need to display text on the screen like that
How can I do that? Do I need to sign the application?
I already checked Overlay screen on Android but the method doesen't seems to work from a service.
Thanks
I was able to add graphical elements using WindowManager to display stuff on top of other stuff (within my app and outside) from a service.
Take a look at how we do that in GlobalTouchService from our project (Reach.io).
If you are just displaying something and interacting with those elements you added, this method will be sufficient. Interacting with other apps(outside your app) through that interface requires additional stuff.
Try it by using RelativeLayout and View.html#bringToFront() method
Check this: example
I'm developing an app that includes reviews of items and due to my design, I want to only show all the reviews in a popup window like in Google Play Store:
What should I use to create that white panel that appears over the current window and contains the necessary information? This should be simple but I'm a newbie and I can't seem to figure out what this "widget" is. Please help me if you are familiar with this so I can use this cool design pattern. Thanks.
It seems you want to display a layout as a popup in another activity.
If you want to do this using an Activity instead of a Dialog, you can do this by setting the activity's theme to android:theme="#android:style/Theme.Dialog" in the manifest - this will make the activity appear like a dialog (floating on top of whatever was underneath it).
A better way to do it would be using a DialogFragment. You can display information in the form of a popup and it will have its own lifecycle. That will be much better than displaying an activity like a dialog
Ram kiran's answer is a good one and one which I like to give also. But just so you have another option to look at you can consider PopupWindow
As stated in the docs, it is
A popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.
I've used this and it works out nicely in some situations. It really depends on what your exact needs are as to which will work best for you.
Go Launcher have a nice first-time tutorial. it is very similar to Stock ICS first time run. I want to learn how to make the similar tutorial display at the first launch of my app. How can I implement this Transparent view (which interacts with screen objects) in my android app?
I was trying to do something similar using a transparent activity with a viewpager inside it. I wanted static 'tutorial' images that users could swipe through.
One of the answers to my question mentioned an interesting library (called ShowcaseView). It seems like it may be a good fit for your requirements as well.
https://github.com/Espiandev/ShowcaseView
You can either use a FrameLayout or RelativeLayout as root of your Activity/Fragment, and put your "first time" View upon content with a (almost) transparent background, or use another Activity/Fragment themed with a transluscent window. (like this)
I'd rather use an Activity/Fragment, but this is up to you!
I wrote little library That contains a simple component for making a app tour. It`s very restricted to my case but maybe could be your case . Single LessonCardView Showed onstartactivity for the first time or on button click Any criticism ,help or advice will be appreciated. thanks https://github.com/dnocode/DnoLib
You can implement a first-time user guide with the Spotlight library by TakuSemba.
It is similar to the one shared above and it is still well-maintained (as of 2021).
https://github.com/TakuSemba/Spotlight
I'd like to add a QuickAction-Bar to my Widget-Project like discussed here.
The problem is, that all those implementations need a View as an anchor. But since I'm building a Widget, I only have RemoteViews.
I checked the source of those implementations and did some research and I found that they all use the standard PopupWindow-class (which is part of Android since API-Level 1). This class offers three methods to be shown and they all want a View as a parameter.
My question is, is there any workaround for that to make this UI-Pattern usable in a Widget? I know it does work since "SUI Call Log" and the "HTC Sense SMS-Widget" do it, too (But I cant get my fingers on source code of neither of them).
(source: suisolutions.com)
The "HTC Sense SMS-Widget" may not be an app widget, but rather a feature of the home screen. Only if you are able to add it to an alternative home screen can you tell if it is an app widget or not.
Regardless, you could start up an activity that displays the quick action. Give it a transparent theme and pass any information you can via extras in terms of where to place the popup. Place a transparent 1px square View at that location as your anchor, then use QuickContactBadge or PopupWindow or whatever you like.
After seeing the last screenshots of new foursquare application and their balloon like cartoon instructions, I'd like to create some of these in my application.
I found a similar question for iPhone
Small popup for instructions... How?
Here is another screenshot of foursquare app:
I'd like to know how I could achieve that with Android.
Thanks in advance for any help.
UPDATE: This is what I could get so far but adding some buttons with a custom drawn background and layering them with a FrameLayout:
But I still couldn't get the triangle effect. Maybe there is something I can do with my custom background shape?
UPDATE2
After checking your suggestions, I decided to go with Aaron C idea and added an image with an arrow on it. This is my current result:
Thank you Snailer, QuickAction API project seems very much promissing. I'll check it out when implementing more features in my app.
Now, I just need to get the right color or maybe I could just let it this way. It seems nice too.
And, so, to summarize what I did:
Got my initial xml layout inside a FrameView.
As I'm using a frameview, everything I put in here will be piled one over the other. That's how I could add things to the layout.
In that framelayout, I put 2 relativelayouts whith an image with the triangle and a button to create the two upper popups. In the bottom I put a button only.
That's it. I hope it helps somebody.
Thank you very much again for all your help!
That sounds like a neat thing to implement. There might be a built-in Android variation on AlertDialog that achieves this, but if not here is how I would go about implementing it:
Create a new Activity whose background is black with a very high (low?) alpha color value. This will allow you to see through it to the previous Activity in the stack. Then, add your alert at whatever coordinates you like using a relative layout with padding values.
You might also want to add a touch listener that exits the Activity if the user touches the balloon (or maybe anywhere in the screen).
If you want to be fancy with coordinate placement of the balloon, you can pass this information into the new Activity using the Activity's launch Intent with the putExtra() methods.
It's probably achieved through skinning a toast.
The developer documentation shows a skinned toast in "Creating a custom toast view" at http://developer.android.com/guide/topics/ui/notifiers/toasts.html
You may want to look at the QuickAction API. It acheives this by using PopupWindow, skinned, positioned, and animated.