android google maps button on popup - java

Okay. What I have so far is an Android app with a Google map on which I've placed a bunch of icons that, when clicked on, create a popup with some text on it. Is there any way to place a button on that popup? If this is not possible, is there some way to make a button appear when an icon on Google Maps is selected?
In case you're wondering, the code I'm using now looks like this.
itemizedOverlay.addOverlay(new OverlayItem(point, title, text));
//actually a whole bunch of OverlayItems, each with their own location and text
//but this is the general shape of it.
mapOverlays.add(itemizedOverlay);
Edit:
There are different kinds of popups used with different versions (check yourself in the emulator versions) of the GoogleMaps app. The first popup simple displays the title of the location (Android 2.3.3).
The second popup shows the title and arrow indicator. (Android 4.0.3)
Interesting enough: I noticed that both popups are clickable and start another activity that shows details about the location.

The mapviewballon project https://github.com/jgilfelt/android-mapviewballoons/ allows you to use your own custom layout for these popup.
I did not test with buttons on it but I do not see why I would not work.
The example projects shows the following types of popup balloons.

Here is another project that creates a custom popup balloon. The project can be downloaded at the end of the article.

Related

Java IntelliJ GUI Designer - How can I: change the window title bar and system menu icon, and go to another form when button is pressed

I'm currently learning IntelliJ's GUI designer but I'm struggling to find documentation or any guides. So far I have watch a fantastic introductory youtube series from a guy called Scott Couprie, which I really recommend to any complete beginners reading this.
I would like to do three things. If anybody has a link to documentation or guides that'd be great.
Change the window title bar text.
EDIT: I have now discovered this can be changed with setTitle("Title").
Change the system menu icon. I am using MacOS so I don't even see an icon in the preview, so I'm not even sure where the icon goes.
EDIT: while I can't confirm this is working due to using MacOS, I see that you can use the following in the constructor:
ImageIcon img = new ImageIcon("images/16x16.png");
setIconImage(img.getImage());
Be able to click a button and go to another form. So far I have been able to switch panels after pressing a button, but only to other panels within the same form itself.
Thanks.
I have tried searching for related documentation or youtube videos but I'm not sure what terms to search.
This can be changed with:
setTitle("Whatever you want the title to say");

Layout icon auto generated activity

I am currently using android studio 2.3.3 with Kotlin and I dont know why these icon are automatically generated (you can see the picture below). Normally I have only one icon. The four icons are exactly the same when I click on it

How to add Android Device Monitor to Main Toolbar in Android Studio?

I'm following Udacity's Developing Android Apps class, and in their video it shows an icon at the top of Android Studio for a shortcut to Android Device Monitor. My shortcut icon is not there so I had to search to find it.
I'm trying to add it to the toolbar by right clicking and going into "Customize Toolbars and Menus" but I can't find anything. I googled multiple different things and can't seem to find the answer. Not sure if this is a recent change from Android Studio updates.
Is there a way to add this to the top toolbar? Thanks!
fortunately it is :)
open the customize menu and toolbars by right clicking the toolbar.
Navigate to Main toolbar-Android.MainToolBarSdkGroup and then click Add after... (in fact you can choose whatever position you like most).
Then simply choose All actions-Main menu-Tools-Android-Android device monitor
Profit – robot is there :)

iOS build Multiple issues.

iOS build of an app has multiple issues some listed below.
iOS build of the same app is flaky when navigating through forms. Previous form elements show together with current form elements making app distorted on iPhone/iPad ... iDevices. Android works perfect.
SpanLabel distorts on iOS.
Some base theme elements look different on iDevices. Should there be an override theme for iDevices?
SideMenu shows with a back button on iOS on Forms where SideMenu is not supposed to show.
SideMenu shows either a back button or a command with the Main Form title area's text as the first command in SideMenu when the current form is not the Main form
Any suggestions and/resource on the right approach to iOS builds.
Attached is the constants defined in the app
All OS styles look different between OS's they should look the same as they do on the simulator. I would suggest avoiding the theme override option unless you really need it as it has hidden complexities.
Try defining the theme constant hideBackCommandBool=true

Settings activity

I am making an new android app and I would like to make a settings activity where the use can see about info and settings.
So on android devices you have buttons for settings or else it is presented on screen, when I click that button I do get a menu with the name settings (which I guess eclipse once made automatically) and I do have a activity_settings (as a launcher activity, I don't know if that has any influence or what it means actually) but how can I link the menu tab and the activity?
I mean that when in the menu is clicked on the settings-tab the activity opens.
Can you help me out?
Thanks in advance,
Ide
Yes, what Samarth is saying is true. Read the developer guide before you post questions here. A simple google search will give you links as well.
Here's a complete explanation on how to implement Menus and how to do it: http://developer.android.com/guide/topics/ui/menus.html
Also a similar question on how to create an option Menu: Android, How to create option Menu

Categories