Connecting tree nodes in android graphics - android

How can I create drag and drop graphics in Android almost similar to html5's canvas. Specifically I want to mimic how ancestry.com's android app "family tree" screen is in the picture below. I want to be able to drag/drop the nodes and connect/disconnect them. I also want the screen to seem "endless"; if you've used ancestry.com's android app you will notice that in this screen below you can move the entire tree left/right until no more nodes are left. My guess is that the nodes in these screens are image buttons and they use some type of horizontal scroll view, but I'm not sure. Thanks for your help in advance! :)

Related

How to do an infinite horizontal sliding scroll of images on Android using Delphi XE 5?

We want to show in an Android app a list of images in the similar manner with many gallery apps: horizontal sliding by using a gesture to show the next/previous image.
Also the image viewer should support zoom/pinch (besides other features).
Images can came from a database or from a directory and can be as much as 200-300.
The question is: Which is the best way to implement the slide-show part from the environment described above?
Through animations of a two TImage? There exist a specialized component for this? By using Horizontal Scroll box?
Stick 10 TRectangle objects in a THorzScrollBox. It could be more or less than 10 depending on the memory that the device has. Align them all to alTop. Load the images for display in TRectangle.Fill.Bitmap.Bitmap.
When the user scrolls down and is near the bottom of the ten, move the top rectangle to the bottom of the chain and load the newest image from your list into the new bottom one.
When the user scrolls up and is near the top of the ten, move the bottom rectangle to the top of the chain and load the newest image from your list into the new top one.
The reason behind doing it this way is that TRectangle is a really light image display container and you are recycling the TRectangle objects instead of deleting and creating them all the time.
It is possible that you will experience a display pop when you move the next TRectangle object to the top of the chain or when you move it to the bottom of the chain. You will have to create code to take care of this either by setting the position on THorzScrollBox or decreasing and increasing the height of the TRectangle as it leaves or enters the view until it is full size.
If you have installed samples with your Delphi instalation then you can find several examples of how to do this in:
Samples\FireMonkey\Fireflow
Samples\FireMonkey\MetropolisUIFlipViewDemo
Maybe there are even more of them. I haven't checked every sample so far.

make main view of app larger than the phone's screen

working on an app and The way I want to set it up is different than what I have ever done before. I want the main activity when launched into the app to exceed past the boundaries of the physical phone screen, and for the user to be able to swipe out to parts of the app that they can't originally see.
I am not sure what the terminology is or what methods or classes etc to use. Any info that could point me in the right direction would be great! Thanks!
Just some clarification:
I think what I'm trying to say is the second thing you talked about. Imagine if you place a iPhone for example in the middle of a piece of computer paper. What I want to achieve is to have the whole view the size of the paper, but only be able to see the size of the iPhone's screen at a time. So you can go up a little bit and see what was above the screen, or left or right
If you want more screens and be able to switch between them, use ViewPager.
If you want one large view bigger than screen, you can either combine ScrollView for vertical scrolling and HorizontalScrollView for horizontal scrolling, or make some custom View, which will be able to scroll (you have to implement it on your own) in both direction.
If you want to have just some views outside of the screen and bring them to visible area on some event, you can use RelativeLayout and set to its views proper margin.
If you want something else, add more information, how it should look and act like.

Draggable split-view with image preview

I am trying to implement the above layout in my Android app.
Basically its two images filling the whole screen, but with a "slider" that is draggable and masks one image over the other. The labels are just some text relating to the image, and should also be masked over when dragged.
So far I haven't been able to see how best to do this using standard layouts, and have been thinking of how to implement this using Canvas.
Any help/tips on the most efficient way to implement this would be appreciated.
NOTE: The slider is supposed to work a lot like the one in the gallery image editor in stock android gallery - except that it stays in place after letting go.
I ended up using LibGDX and making a custom scene for everything.
Didn't find a way to do this using built-in layouts.

Create large content grid in Android

I want to create a large grid for a android phone application where the size of the grid may vary from e.g. 10x10 to up to around 300x300. The content of each cell will be a test and some background (grid will eventually become skinnable).
I developed this earlier for iOS using UIScrollView and CATextLayers for labels, where the cells' content were loaded/unloaded based on their distance from the the visible section of the screen so that memory-wise it was always within a decent range.
What is the equivalent to this in Android applications?
I will be developing for 2.3 (and later for 4.0) and it should run both on phones and on tablets.
Some info before making a decision:
While in iOS UIScrollView goes in both axis, android's ScrollView just go in one direction.
In Android you have a GridView, but, once again, I don't think you can scroll in both axis.
In Android, widgets that work like a UITableView needs an Adapter that takes care of creating each of the views.
If I were you I would start reading:
How androidbigimage project handles the scrolling through all the screen.
How the GridView positions it's item in a grid and how it handles the variation of the grid size.
Once you get all that info, create a custom view similar to the GridView and start placing items using an Adapter.
PS: When you finish it, make it open source :)

Android: Employing ImageButton with ListView

I’ve delved into the Android documentation that is somewhat nebulous regarding my question. Is it possible to overlay an ImageButton over a ListView employing a SimpleExpandableListAdapter? If so, pointing me in the right direction (code example or technical specs) would be most appreciative.
Additional clarification: I’m designing/developing a prototype courseware app template to be used in advanced degree programs. For this specific piece, the upper 2/3 of the screen will contain a ListView employing a SimpleExpandableListAdapter that pulls such items as lesson orientation, activities, and assessment instruments from a resource file (text file to make it easier to populate/modify). The lower 1/3 will be comprised of ImageButtons that control the flow of other lesson functions such as RSS feeds, access to school Websites, and arrow buttons that will change the contents of the upper 2/3 of the screen while leaving the lower 1/3 screen as is. In essence, a customized GUI menu system at the lower 1/3 of the screen. Thus, looking to determine if it is technically feasible to layer ImageButtons over a ListView. Thanks in advance.

Categories

Resources