How to do long scroll menu with level selection ? - android

And many thanks for your help on this !
I would like to do an application where the main menu is like a long (very long) scroll view with some buttons to select different levels. The goal is to have custom buttons for level and custom styles for each part of the menu (like different worlds).
But I don't know how to do this easily (maybe) and efficiently (for sure) ? I though about a long ScrollView, but the performance could be really poor. Or about a ListView / GridView with a very custom style ?
Do you think it is needed to include a full game engine to achieve this ? Even the rest of my app does not need it ?
I found some inspiration apps which already use those kinds of menu :
HeadSpace App
Score! Hero Game
Or even a less styled one :
DuoLingo App
Thank you so much for your ideas, and hints on this !
Have a nice coding day !

I think this is a very personal question and decision; I mean: this depends on you, your preferences for your own game, is not a technical question. Personally I like your designs, but I think that "a long (very long) scroll view" could be slow and too heavy for the player. Think on the game experience, and the way you make it easier to interact for the gamer. That solution would be so slow to get the last levels, almost irritating. IMO, it is better to have one button for each world, and each of them guides the player to the levels inside that world. There you can use a GridView, customizing that, ordering buttons on zig-zag... But this is if you can repeat the levels or replay them; if is necesary to have that. If it is not necesary I woudn't show that as main menu.
Again, this is a very personal question and decision, not technical; and here people like me can give you a subjective opinion. It all depends on your preferences.

Related

Android visual animation on screen touch

I am coding a game in android and i want to play a kind of animation when user touch the screen. I know that there is probably tutorials to do this. But i don't really know what is the name of this effect so i don't know what to search.So all my searches were vain.The effect is like the one you could see in this image(image ) in Magic Tiles 3.
Thank you.
I would suggest you to switch to unity :) Native Android is not really made for that kind of stuff.. More constructive answer:
Quick googling showed couple of particle libraries, for example check this
Running particle like animations natively is not really a recommended way to go since since you will be running around 10-15 animations in a loop (which will have a really hard impact on your apps performance). If you still want to go this way, it would be the best to create animated drawable or use lottie animated image views and set as your layout background

UI Design on Android: Is it usual to use drop down menus for commands?

On a screen I am designing there is a large number of commands the user can execute. But they are groupable so I thought about using drop down menus.
I'm wondering if it's usual to use drop down menus for commands. I actually never saw them being used for anything but switching views and picking information.
And if yes, which pattern or building block can I use to implement it? Or do I have to write it by my own?
I suppose this depends on what you mean by "commands". In general I would say no. A Button may be better depending on exactly what you mean. However, it sounds like you are talking about a lot of commands in which case a lot of Buttons may not make sense.
A ContextMenu may be better for this especially if you are talking about editing an item and such. These are easy to set up and there is a good example in the docs that I posted a link to. A user simply long-clicks an item and a small menu with options is brought up.
An ActinBar may suit you also. But it really depends on your what, how you want it to look, and what your users would expect. But the first thing I think of when I read "commands" would be a ContextMenu
Two other options you have could be PopupMenu and PopupWindow. Note that PopupMenu requires API >= 11. But with your comment I definitely think a Spinner would be appropriate.
Check out lorensiuswlt/NewQuickAction3D: It really pretty and easy to use.
Tutorial in the README:
https://github.com/lorensiuswlt/NewQuickAction3D
If you more interested in something as seen on older HTC devices:
https://github.com/lorensiuswlt/NewQuickAction

Best way to implement Day View / Schedule Android UI

(disclaimer: all my life I've been incredibly far from UIs of any
type, shape or form - backend and algorithms were my things, and UX,
unfortunately, wasn't. But there's always a moment when you want to
give it a go...)
I've been fiddling with an idea of a toy project for myself, and as a part of it, I want to implement something similar to Schedule/Day view in Android calendar. Probably best this is explained by this UI mock (admittedly I'm not the best UI designer, but hopefully this would be enough to illustrate my point)
Currently I'm thinking of using RelativeLayout to layout the schedule blocks and redraw background with the grid (hour lines). I fiddled a little bit with RelativeLayout and arguably this might do the trick, but I'm very unsure about the background. Do you think this approach would work? Is there some better way of doing it?
Many thanks in advance!
I was looking for the same thing, and could find no good options, so I created the yadview project (https://code.google.com/p/yadview). yadview is a fork of the DayView schedule in the AOSP Calendar app, but has been reworked significantly to allow for integration into your application.
Sample screenshot of this View in an Activity:
I'm working on a project very similar to this! The idea is to have a sense of priority to the items. That way, the user can collapse the views into a single executable list of tasks, not worrying about the things that are lower priority until they need to cancel the higher priority events, at which point, the lesser priority events seamlessly fill in the blank space. Feel free to message me directly, as I'm sure there aren't many who would find our conversations helpful.

Slide images the screen. Do I really need to write my own "game engine" or use someone elses?

I'm thinking about writing a pretty basic game, which mostly involves sliding images around on the screen when tapped. So tap an image and it slides to one side. Doesn't seem like Android Animations will help me here since those don't actually move the images, just makes it appear moved.
So even though this seems like pretty basic functionality, it seems like I have to write a game loop,etc and implement my own code to handle the "animation" (including some acceleration/deceleration), etc. Not hugely hard or anything, but just seems like overkill. Also using a 3rd party game engine also seems like overkill, just in the time it would take to learn that, and so on.
Am I off base here?
If anyone has any suggestions that might get me pointed in the right direction (links, etc) that would be great. Is there a good way to use Android Animation functionality in this case that I am missing?
If you are developing for Honeycomb, it may be as easy with animations. With Honeycomb, there is a whole new strategy to animation. Check out the blog. The premises is that any property or value can be animated, and that includes the view's actual position (and not just look like it moved).
I have built a couple of games using AndEngine (http://andengine.org) I would recommend it for making games for android. And since it is all written in java, it is relativiely easy to integrate it with layouts and other activities.

Threaded ListView for Android

I'm working on an app that involves displaying comments from a website. These comments are threaded on the original site, so I'd like to replicate that experience within the app. I know that Android has an ExpandableListView, but it only does two levels and I was hoping for more.
Each top-level content would be aligned to the left. Replies would be indented by x units, replies to the reply would be indented x*2 units, etc.
Additionally, I'd like the ability for the user (or even the application code) to minimize/maximize threads. This would be particularly useful if the first comment has 8724 replies - you could just minimize the original comment instead of scrolling endlessly until you reach the second top-level comment.
What is the best way to present this multi-level list to the user? Are there any native/third-party classes/libraries I can use, or would I be better of coding this list in HTML and displaying that to the user instead?
I don't really think you should use a tree for displaying thread. Device screens are too small for this kind of widget. I would prefer multiple activities for displaying different levels of the thread. But I'm not a UI designer so my opinion may be far from the ideal solution.
EDIT: Here's an open-source tree-view widget: http://code.google.com/p/tree-view-list-android/.

Categories

Resources