How to improve a MapActivity/MapView - android

I'm looking for some ways to improve a MapActivity with additional features.
For instance, on several applications, I have seen animated popups when the user clicks on an item. This is the kind of things I would like to do (so that I get rid of the ugly alertDialog).
Maybe some libraries already exists? Or could you point me out some tutorials to do that on my own?

In order to get those popups (I'm assuming you mean an expanded ballon over that point) you can use this excellent library called MapviewBalloons. It's pretty easy to integrate this into your existing code. In order to modify it you can just modify the layout of the balloon and change it to something you'd like.
Here's an example image:

Related

Implement a split preference in Android

I feel like there must be a straight-forward way to achieve this, but I haven't found it so far.
Essentially, in the stock settings app, there are a handful of preferences that are "split" - i.e., tapping on the text of the preference does one thing, while tapping the icon to the right does another.
I tried making a custom preference that extends PreferenceGroup, but it seems like PreferenceGroup doesn't really wrap the child views the way a LinearLayout does, for example, but rather just puts all the child views below it. I tried instead extending from LinearLayout but it seems the PreferenceScreen only allows Preferences as children.
My question is more or less what the best way to do this is:
Make a custom preference that does somehow take other preferences as children and display them correctly (this seems like it would be ideal, but I'm not sure how I'd achieve it)
Make a custom preference that, when tapped on, somehow figures out which part was tapped and runs the correct handler (this seems more straightforward, especially if a lot of it is hardcoded into the Kotlin class for the preference, rather than being configured in the XML)
Something else that I haven't thought of.
Like I said, it seems like this shouldn't be too hard, but I haven't found any other recent questions about it on SO. I did find this question but it was asked and answered in 2012, without super clear instructions. There's also this question which asks about something somewhat similar but is nearly 11 years old and the only answer is fairly useless.
Please let me know if there is something I have totally overlooked (maybe I've been using the wrong search terms??) or if you have any suggestions! Thank you!
So, it doesn't appear that this is very possible with the xml format for a settings page, so I decided to implement my settings activity in Jetpack Compose. My solution is by no means the most elegant (and needs more comments, I know), but how to do this the "proper" way is definitely beyond my knowledge.
EDIT:
I made some changes to the preferences (most notably, ditching SharedPreferences in favor of Preferences DataStore) and to make it easier, I'm just going to put the link to the GitHub where the files are (and then y'all can see them in a full example):
ComposablePreference.kt
SettingsActivity.kt
Hope this is helpful!

Android UI Implementation Advice Needed

I'm fairly new to Android and I'm working on an application in which one particular section involves a more advanced UI interface than what you would normally create with the stock UI components. I've read through most of the SDK tutorials and I get the basics but I can't see how to implement something like this. I'm not looking for any code, just some advice on what technologies I should be reading about to achieve this.
Here is a mockup:
So basically at the top there is a thumbnail strip that the user can flip through. Clicking on a thumbnail will perform some action. I'm pretty sure there's a stock control for this.
Underneath that I need to be able to create a composite image that can be pinch zoomed and panned and has hotspots that can be clicked (tapped) on. For example, an image of the solar system, in which the background would be static, but the planets need to be placed at runtime and need to be clickable, and the whole thing needs to be pan/zoomable. Support for very minimal animation (eg slow planet rotation) would be a plus, but not necessary. I'm at a loss on what I would achieve this with.
Finally, there are three pull-out panes that contain other content, such as images, menu items, and other media. Basically these just need to be containers in which I can place any other UI content.
I've done some basic Activities so far with simple forms, so I understand the basic workflow of Android, but I'm just not sure what to look at to achieve something like this. Is this a good candidate for a SurfaceView? Is there something else I should look at? I have been a bit afraid to get involved with OpenGL, since I don't really have a 3D background, and I still want to be able to use native components (buttons, listboxes, etc) without having to re-implement them in OpenGL.
Have a look at this for the slides:
http://developer.android.com/training/animation/screen-slide.html
as for the thumbnails you can use a linear layout, with some imageviews and buttons.

Display an image over the view

I am making a small application and I have noticed that a lot of people don't really check the menu to see all the possible options my app has, and I think that they don't know how to access it. I have seen this on an application some time ago, and I tought I should make something like that. I would like to display like a transparent image over the app with small arrow pointing to all the buttons that I have on my app. The problem is I don't really know how to make this and I thought may by somebody here knows how.
Try the Showcaseview library.
The ShowcaseView library is designed to highlight and showcase
specific parts of apps to the user with a distinctive and attractive
overlay. This library is great for pointing out points of interest for
users, gestures, or obscure but useful items.

Creating professional GUI for Android application

I want to create professional looking GUI for Android application. Something more than just raw widgets which I'm taught to use in countless tutorials in the web.
Unfortunately, I couldn't find any source of information how to customize those widgets and create better looking GUI.
Examples could be: http://android.appstorm.net/wp-content/uploads/2011/03/calorific-sc.jpg
or http://android.appstorm.net/wp-content/uploads/2011/03/chomp-sc.jpg
How are such GUIs created? If you could point me out to some tutorials on it, I would be really thankful!
Greetings,
Bart
There's nothing in those examples that looks like it couldn't be made from standard components. For instance the second screen of that calorific application is just a background image for the window with a list and a button with a background image as well. The first image could easily be done with just buttons and background images for views as well.
TLDR: Split the view into rectangles, assume that these are all standard components with images as backgrounds unless they seem to have nonstandard interactions.
Those are called custom components.
You will need to do a fair amount of work to get the look you want. (compared to using system components).
http://developer.android.com/guide/topics/ui/custom-components.html
Edit
Bone up on your Google-fu Bart!
http://www.google.com/search?q=custom+components+android+tutorial

How do I implement an application similar to google maps on android?

I have a couple of images on available to my program. They are parts of jigsaw puzzle (with rectangular pieces though). I wanted the look and feel similar to that of google maps in android.
One way I could implement was to create a set of ImageViews and keep recycling them, as the user pans the image in any direction. However, to me that appears like a brute force method. Is there any alternative approach to implement such kind of application?
Or rather how is google maps implemented? A set of Imageviews ?
I think for your case the OpenGL route might be the best choice. You can get started with the GLSurfaceView.
Using set of images and recycling them is a valid method. But you can enhance it by adding some redundant ones to keep close to view area images preloaded.

Categories

Resources