0

I'm in the process of building an interactive presentation on an android tablet. I've going through the basic tutorials to try and get an understanding of the tools available. I'm now at the stage where I'd like to create a dummy application but I'm unsure about the best approach for this. I've attached the image below to give you an idea of what I'm looking to do:

enter image description here

What I'm looking to do is have a static navigation on the right. When you select the options on there, they'll switch out the content on the left, by rotating the panel and having the new content on the flip side. The middle pane will be a collection of images that can be swiped through.

So far I've been playing around with the ViewPager class and this seems to be ideal for allowing me to quickly swipe between images. The only enhancement I'd like to make is to allow the user the ability to pinch zoom on these images, but only the images get zoomed and not the entire screen. Is this possible?

Secondly, coming from a web background, I'm trying to figure out what the equivalent of a div is for android? Ideally I'd like a panel on the left with multiple textviews/imageviews depending on the content but I'm not sure how to achieve this with the android API. Is it a case of creating one big fragment and having multiple nested views within this?

I also wonder how I can achieve the rotating effect on this panel. I've managed to achieve the effect in a dummy app using:

tv.animate().rotationYBy(180).setDuration(2000);

But what I don't know how to do is to get the content changed when a new item is selected. I'm thinking that maybe I'll dynamically remove the current fragment, add the new fragment and quickly rotate it on menu item select. Is this a sensible approach?

I apologise if these are daft questions, I'm just having a hard time understanding how I can achieve these things within android. Any suggestions?

Thanks

alimac83
  • 2,346
  • 6
  • 34
  • 50

3 Answers3

1

I can make your life little bit easier and say that there is no kind of default layouts you can simply use to implement a such thing. Implementation of a such layout will be different from developer to developer, I think complete answer you will not receive because it is complex and require writing actual code too. From me, I can try to assist you and I'm sure everybody else will too.

Volodymyr Lykhonis
  • 2,936
  • 2
  • 17
  • 13
1

You definetly should read about Fragments.

As for the zoom you can create a custom ImageView. (Like This)

The equivalent of div in android are the layout containers, such as LinearLayout, RelativeLayout, FrameLayout, etc... Read this for more info about layouts.

Community
  • 1
  • 1
Saito Mea
  • 455
  • 4
  • 11
1

I have seen 1 example in ActionBarSherlock library sample (Styled) in which 1 fragment is rotated 180 degree when a Tab is pressed. Just same as you want. see link below.

Have a look at Android Fragments and following two libraries, you can get every thing required from these libraries, see sample codes.

  1. ActionBarSherlock
  2. Android-ViewPagerIndicator
j0k
  • 22,600
  • 28
  • 79
  • 90
Androider
  • 2,884
  • 5
  • 28
  • 47