I'm supposed to make a simple android application, in fact it's almost as simple as a slideshow.
The good thing is that the content of each slide is very similar - some text and a photo. So I only have to do one layout and simply switch it's content on a slide motion or a button press.
I think it would be more appealing if I add some suitable animation - e.g. flipping the whole page.
Is there already a tool for this? If there's not than what's the best/simplest way to do this?
http://code.google.com/p/android-page-curl/
Related
I need to design introduction walk-through screens when my app launches. It can be done by simple ViewPager or horizontal scroll view (?) but the additional requirements which are hindering me from using these are
A lot of animations on each screen
Animations will be bound to scroll position (i.e., current stage on an animation will be determined by how much user has scrolled, and it should roll back animation if user scrolls back without finish gesture)
Some items need to animate across different screens (e.g., There is a box on first screen, when user scrolls to the next screen, the box becomes larger without moving and a graph (a part of second screen) also comes into display under it)
I dont know if I explained the scenario well enough so please ask for clarification in comments. I need just a direction to control/approach/library.
Thanks
I'd recommend this library : ShowCase
In this way, you can make interactive tutorial and walkthrough your app.
You can also take this library and add some functionality.
Use viewpager, for each fragment you can use different animation inside that fragment, each fragment is independent from other views/fragments
You can use horizontal scroll view but it will take extra time and difficult to code
Seems like a ViewPager has everything you need.
I'm apparently not phrasing it correctly to get any accurate results on Google. I want to be able to slide right/left to go to another layout. What is the proper term I should be using when trying to find an example of how this is done?
You are looking for the ViewPager.
I'd like to make a view in my Android app that flips between multiple views on a swipe/fling. I'd like it to behave more or less like the Android Launcher behaves when flipping between views. In particular,
It should flip views on swipe.
Generally a swipe will flip between one view and the next. It should not fling across all of the views.
If you swipe slowly, you should see the views dragging as you're swiping, eg. the way the Launcher does it.
I tried using a ViewFlipper with a GestureOverlayView as per Romain Guy's blog post here, but there's no indicator to the user as they're swiping. This makes discoverability difficult, which is presumably why Launcher does it the way they do.
I tried using a Gallery object, but when I swipe from left to right, there's a certain amount of momentum that flings the users through all the views rather than just taking them to the next view.
Is there a good way to accomplish what I'm trying to do?
I know this is an old question but ViewPager is created for this exact same purpose. ViewPager is part of android compatibility package and more can be found at http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
Take a look at HorizontalPager. It's actually based on RealViewSwitcher, which in turn is based on the Android homescreen's code, and supports snap-to paging with drag feedback, as well as nested vertically-scrolling subviews. Gesture support for fast swipes isn't all it should be, but this may get you part of the way there (and I'd welcome contributions back).
EDIT: As of 2012 you're much better off using Google's ViewPager - it's in the compat library.
Check out SwipeView within this project https://github.com/fry15/uk.co.jasonfry.android.tools It does exactly what you want it to do and is super simple to implement.
#CommonsGuy extended ViewFlipper to do it.
https://github.com/commonsguy/cwac-viewswiper
Ihaven't used this one yet so im not sure if it moves with your finger like the launcher if not your going to have to make an OnTochListener to do it for you in me.ACTION_MOVE you will update the view to change its position. I'll post some sample code when I get home if you don't get another answer.
http://androidapt.wordpress.com/2010/11/19/pulse-news-reader-an-android-app-that-kicks-rss/
Gallery inside ListView it's clear, but:
What is the technology that allows you to show a ScrollView under opening ListView?
How to make gallery and top bar move down by touching screen inside opened Scrollview?
I don't need the direct code, just show me where to lurk for this info.
I though that it uses SlideDrawer, but it reacts only on touches, then i think it is something similar to SlidingPanel
It is a gallery with left margin adjusted.
Accept Mark's answer as right way to made it.
That is not a Gallery widget, AFAICT. My guess is a LinearLayout in a HorizontalScrollView. I am impressed that it works -- I wonder how much headache was involved. In terms of your questions, I have no idea what you are talking about and how they relate to the video
Yes Mark, We have reengineered the pulse app, It is the gallery with its left margin adjusted.
and the center locking on gallery item click is also overridden.
I found a nice feature in Dolphin browser that brings another window from the side on a side-swipe. It's like the window is connected and revealed by swipe. See image below. Anyone knows how it is done?
I might be wrong but my guess would be they use a SlidingDrawer set to a lanscape orientation in a portrait layout (so it comes from the side rather than the top/bottom).
EDIT: Ok, I see now - I was rushing to go to work and didn't pick up on the fact the left hand side is displaced.
I suppose you could use two opposing SlidingDrawer views and force one to be initially open and the other initially closed. If their 'handle' views were identical and overlapped, then the effect would be similar to what you are seeing.
I'm not sure if the 'purists' would approve as the SlidingDrawer is meant to be used in an overlay fashion, i.e., it is meant to cover an existing view rather than to appear to move another out of the way. Then again, I've been coding for many years and often go on the principle that if it works why not use it?
Alternatively, there is some example code on smooth horizontal view scrolling in the answer to this question if it is of use. Horizontal Scrolling with fling gesture - ebook reader