How do I do something like Google Map's introduction callout - android

When opening Google Maps' Drawer menu for the first time, or with cleared app storage you will get a view like this:
The normal view is typically like this:
I've been messing around in my XMLs for a while and I still can't get anything remotely similar to show up. Does anyone know how they do the selective dimming and the overlayed callout?

Try this library: https://github.com/amlcurran/ShowcaseView
A bit outdated, but I used it a couple of years ago and it still works perfectly in my app.

Related

Android, how to make a Splash Screen aka Launch Screen without the white screen?

As many other Android developers, I'm not a huge fan of splash screens, but still most customers want them because iPhone has them or some other "great" reason.
In the android guidelines it says:
Naturally, you want everyone to quickly learn the ropes, discover the cool features, and get the most out of your app. So you might be tempted to present a one-time introductory slideshow, video, or splash screen to all new users when they first open the app. Or you might be drawn to the idea of displaying helpful text bubbles or dialogs when users interact with certain features for the first time.
Link here, first paragraph in "Don't show unsolicited help, except in very limited cases"
And now in the material design guidelines they recommend developers to use a "Launch Screen"
Because launching your app while displaying a blank canvas increases its perceived loading time, consider using a placeholder UI or a branded launch screen.
I'm guessing the android website hasn't been updated yet. Anyway, the last version of Hangouts (5.0.104...) has a very nice and quick Launch Screen. Its displayed instantly on my Nexus 5 with Marshmallow. So my question, is there an "official" way of doing this?
I've been searching for examples but can't find anything except for kind of workarounds like this example here which uses what I think is the most common approach with a Splash Screen Activity. This, however, shows a white screen when the app has been destroyed before your actual splash screen is shown.
This second example uses a theme with a window background which is shown instantly but disappears almost equally quick.
So, how does Google make the Launch screen like in Google Hangouts which is shown without delay and without any white screen before?
A colleague from my work have been in a material design training at Google HQ in London and their official way of doing it is using the windowBackground in the theme as you posted on your own question: http://antonioleiva.com/branded-launch-screen/
The idea is that the XML theme gets show very very fast by the framework, and as soon as your actual layout is loaded it will be visible.
The difference between Hangouts or even Google Maps, is that their layout is a very heavy/complex layout and they simply take longer to load than a HelloWorld app.
As your app grows and gets more complex and with more elements being initialized during Application.onCreate or Activity.onCreate, your slash screen will also be visible for longer time.
edit:
I've found a Google+ post from the official "Android Developers" profile and repost from Google engineer Ian Lake saying the same thing:
https://plus.google.com/+AndroidDevelopers/posts/Z1Wwainpjhd
https://plus.google.com/+IanLake/posts/SW7F2CJvAmU
It's because the first solution (http://antonioleiva.com/branded-launch-screen/) is changing the theme in onCreate. But the widgets of your activity are not yet rendered in onCreate. That's why you see the white screen. The second example is a good one. If you need longer time set SPLASH_TIME to longer. Check the line Thread.sleep(SPLASH_TIME) in the doInBackground function. You can wait more.

ActionBar background fill? How did Google do this?

If you haven't seen already, the Google IO 2014 app has a unique feature. If you were to download it right now and open up any one of the sessions and scroll down slowly, you'd see that as soon as the colored bar reached the ActionBar, it stops scrolling and the ActionBar spacing (height) is filled with a color using an animation. I was wondering how Google accomplished this, any ideas?
(Download the app check what I mean, sorry was unable to make gif).
Google I/O app is an open source project. Just download the code, read it and see how they do it ;)
if you are too lazy to read the source code XD here you have a detailed tutorial about how to get exactly that: Pushing the ActionBar to the Next Level
I guess what #DiegoPalomar suggested is not the exact solution as we want an animation, not just fading. As far as I understood from the iosched sources, Google is dinamically changing a View's properties which is just an empty colored View behind the titles. But to my mind, the Google's implementation is a bit complicated.
You can check FloatingTitleBar sample code to catch the idea.

How do you display hint circles in Android?

I'm wondering how to display the "hint circles" (I don't know what they're really called, and I couldn't find it anywhere) when opening an app for the first time. I've seen this in many stock android apps, but not in many third party apps. Is there even a way to do this?
Thanks!
Here is a picture of what i mean. (The blue circle with the OK, not the white one)
there is a library for that, check ShowcaseView
From what I have experienced with these, they seem to just be a form of a splash screen, or another image overlaying the actual app. Even if the stock apps don't handle it like that, couldn't you just have the app open up a new screen that contained a mostly transparent image except for where you want the ring or other hints. Then you can just at a button to that screen, so that after the user has read all of the hints, then they could close the screen.
I do not know how to totally do this, but since you said you couldn't find any documentation on it, I figured this could either give you a solution or point you in another direction to keep looking.

How to create Nexus 4 camera like popup control on a map

Hi guys I'm trying to create a custom popup control, which would be shown after the user has long-pressed on a Google map. I would like the control to look something like in the nexus' 4 camera application: see it here.
Can anyone suggest how to start?
I have also searched in the native camera app code found here, but I'm totally lost in all that code. Has someone come across a tutorial of how to build such control? I really googled a lot but couldn't find any solutions.

Android 2.3 and Blackberry Show Page as Column that Let you Scroll Way to Right and Bottom

Does anyone have a clue what could cause this behavior? If you view this page on Android 2.3 or Blackberry, you should see the problem.
You can scroll straight past the end of the page to a yellow background that goes on forever. You can also scroll off the right side of the page to do the same thing.
It works fine on Android 4 and iOS 5.
See site with issue here:
http://wwwa1nbkclientsitecom.zippysites.com/
p.s. I asked about this yesterday but with less detail. And I've made some changes sense then, but those didn't fix the problem.
It was the dynamic google map in the footer. It had nothing to do with my page layout or style. Everything I did was fine. Removing the dynamic google map fixed it. SOLUTION: Replace with a STATIC google map. Its kind of bad to be using dynamic map embedded in page for a mobile device anyway.

Categories

Resources