Is there an Android view/layout/widget that allows flinging/swiping between included views?

by E. » Tue, 07 Dec 2010 04:59:53 GMT


Sponsored Links
 I'm looking for a layout that includes different views and allows
switching between them, but unlike the tab view which switches
instantly and uses a large amount of screen real estate, allows the
user to fling/swipe between the views (ideally with small images
indicating how many views are available and which one is the current
one like, forgive me, iPhone apps display).

The HorizontalScrollView view allows flinging, but does not have a
separation between screens.

If there isn't a standard component that does this, is there another
that is often used for this purpose?

I realize I could implement this myself without too much trouble using
gestures, but I'd like to avoid reinventing the wheel (if, that is,
it's already been invented in this case) and defining my own
thresholds for the fling action means my app and other apps that try
to do the same thing do not provide a consistent user experience.



-- 



Re: Is there an Android view/layout/widget that allows flinging/swiping between included views?

by Mark Murphy » Tue, 07 Dec 2010 05:06:21 GMT


 


ViewFlipper, augmented with gesture detection, such as:

https://github.com/commonsguy/cwac-viewswiper

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books 

-- 


Sponsored Links


RE: Is there an Android view/layout/widget that allows flinging/swiping between included views?

by Tommy » Tue, 07 Dec 2010 05:06:32 GMT


 Take a look at the ViewFlipper
 http://developer.android.com/reference/android/widget/ViewFlipper.html you 
can then impliment your own gesture dection for swipe/fling left/right and
switch the tabs accordingly using the viewflippers next feature.

-----Original Message-----
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of E.
Sent: Monday, December 06, 2010 4:00 PM
To: Android Developers
Subject: [android-developers] Is there an Android view/layout/widget that
allows flinging/swiping between included views?

I'm looking for a layout that includes different views and allows switching
between them, but unlike the tab view which switches instantly and uses a
large amount of screen real estate, allows the user to fling/swipe between
the views (ideally with small images indicating how many views are available
and which one is the current one like, forgive me, iPhone apps display).

The HorizontalScrollView view allows flinging, but does not have a
separation between screens.

If there isn't a standard component that does this, is there another that is
often used for this purpose?

I realize I could implement this myself without too much trouble using
gestures, but I'd like to avoid reinventing the wheel (if, that is, it's
already been invented in this case) and defining my own thresholds for the
fling action means my app and other apps that try to do the same thing do
not provide a consistent user experience.



--


-- 



Other Threads

1. make logcat flow through printk

this is the kernel patch.

--~--~---------~--~----~------------~-------~--~----~

2. error: 'mSharedFd' was not declared in this scope

I am trying to build Android and keep hitting the same roadblock.  I
assume nobody else is getting this problem, otherwise this would
appear to have been discussed.  I am trying to build Android for my
eeePC 900, and when I build, I am getting the following...

target thumb C++: libandroidpv <= external/opencore/android/
playerdriver.cpp
In file included from external/opencore/android/drm/oma1/src/
pvmf_cpmplugin_kmj_oma1.h:39,
                 from external/opencore/android/playerdriver.cpp:79:
external/opencore/android/drm/oma1/src/
pvmf_cpmplugin_kmj_oma1_data_access.h: In constructor
'DrmPluginDataAccess::DrmPluginDataAccess(PVFile*,
DrmPluginDataAccess::DataAccessMode, char*, int)':
external/opencore/android/drm/oma1/src/
pvmf_cpmplugin_kmj_oma1_data_access.h:73: warning:
'DrmPluginDataAccess::pvfile' will be initialized after
external/opencore/android/drm/oma1/src/
pvmf_cpmplugin_kmj_oma1_data_access.h:70: warning:
'DrmPluginDataAccess::DataAccessMode DrmPluginDataAccess::accessMode'
external/opencore/android/drm/oma1/src/
pvmf_cpmplugin_kmj_oma1_data_access.h:60: warning:   when initialized
here
external/opencore/android/playerdriver.cpp: In member function 'int
PlayerDriver::setupHttpStreamPost()':
external/opencore/android/playerdriver.cpp:628: warning: deprecated
conversion from string constant to 'char*'
external/opencore/android/playerdriver.cpp: In constructor
'android::PVPlayer::PVPlayer()':
external/opencore/android/playerdriver.cpp:1388: error: 'mSharedFd'
was not declared in this scope
external/opencore/android/playerdriver.cpp: In destructor 'virtual
android::PVPlayer::~PVPlayer()':
external/opencore/android/playerdriver.cpp:1420: error: 'mSharedFd'
was not declared in this scope
external/opencore/android/playerdriver.cpp: In member function
'virtual android::status_t android::PVPlayer::setDataSource(const
char*)':
external/opencore/android/playerdriver.cpp:1431: error: 'mSharedFd'
was not declared in this scope
external/opencore/android/playerdriver.cpp: In member function
'virtual android::status_t android::PVPlayer::setDataSource(int,
int64_t, int64_t)':
external/opencore/android/playerdriver.cpp:1451: error: 'mSharedFd'
was not declared in this scope
external/opencore/android/playerdriver.cpp:1459: error: 'mSharedFd'
was not declared in this scope
external/opencore/android/playerdriver.cpp: In member function
'virtual android::status_t android::PVPlayer::reset()':
external/opencore/android/playerdriver.cpp:1644: error: 'mSharedFd'
was not declared in this scope
make: *** [out/target/product/eee_701/obj/STATIC_LIBRARIES/
libandroidpv_intermediates/playerdriver.o] Error 1

Alan

--~--~---------~--~----~------------~-------~--~----~

3. How to telnet from the host to the android board

4. Linking troubles for modules.

5. SpaceWars Beta Released on Android Market!

6. How to backup email databases?

7. Fwd: Linking troubles for modules.