Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Android Tree Hierarchy UI

  • 20-06-2012 8:28am
    #1
    Closed Accounts Posts: 19,777 ✭✭✭✭


    I'm looking at building a UI that would best represent an overview tree hierarchy (i.e. not a drill-down UI where you only see one level at a time). Each node should be represented by a bitmap icon (which when selected would go to another screen) and due to the overall tree size some form of either zoom and/or scrolling would also be a necessity.

    So the question is, what do people suggest is the best approach for this?

    Custom Views and UI components are one approach, although I'm not entirely certain how best to do so with these, and potentially there are other ways to skin a can, as it were.

    Any ideas?
    Tagged:


Comments

  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Is it a game your developing? If so maybe look into developing with a game engine?


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    I'd rather avoid that as other than the curve of choosing one that will suit, there's the curve of learning to develop using one, when really all I am looking for is a best fit solution for one bit of functionality.


  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Would using the canvas directly be an option or overkill for what you want to do?


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    I don't know. Most Android apps I've written have required pretty standard UI's, so it's an area I have limited experience in.

    Working directly with the canvas may be the way to do, but my concern is more to do with the fact that I'll still want to incorporate imbedded icons and am unsure as to how this will work.

    Principally what I'm looking for is a recommendation for a direction to go in.


  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    A library like this may be what your after? http://mapp.android-libraries.com/

    $200 fee is a bit hefty though depending on what kind of app your making. There is probably an open source one out there, this may allow you to do what you want but I haven't looked into it - http://code.google.com/p/osmand/

    From your description of what you want I'm imagining a map like that, sort of like old style Mario games where you have a map with different points on it and the user can select these points? Am I correct?


  • Advertisement
  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    No actually, much simpler than that; I'm looking for the best way to represent (and use as a UI) a tree hierarchy, like this:

    tree_graph.gif

    Where each node would be represented by a clickable thumbnail/icon bitmap and ideally supporting scrolling/zoom for larger structures.


  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Will you need to be able to dynamically create the tree? GridViews may be worth looking at if it's static.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Belated reply.

    Thanks for suggesting the use of GridViews; I probably should have considered them myself given I've used them in the past. They're not ideal, however they could be made to work, especially if I can make the canvas larger than the screen and allow for scrolling. Might be the way to go.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Rolling your own with opengl will give the most performant solution, but is hard and a lot of work.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    I've little or no OpenGL experience, so on top of implementation there would be an initial learning curve. I would tackle this if OpenGL would be used in more than just this, but it's not.

    I think the approach I'll take is the one suggested by draffodx, but I'll modularize that code in the event that I revisit the topic in the future and choose to replace it with something such as OpenGL.


  • Advertisement
Advertisement