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. Debug application framework with Eclipse

Hi,

I would like to know the tools which enables to debug the application
framework layer on a target. Indeed, I would like to be able to follow
each step when an application is launched for instance (not using the
logCat but using java code, with the possibility to put
breakpoint ...) and I would like to modify the components of the
application framework layer, such Package Manager, Telephony
manager, ... I 'm using Eclipse for application debug, but is it
possible and how to do previous describing tasks thanks Eclipse
(Application Framework debug, ...)?

Jeje

-- 

2. ListView item click can't work

Dear All,

Why the following function can't work when i click the listview item?

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id)
    {
        Log.d("aaa", "onListItemClick" + position);
    }

-- 

3. Making SmartCard feature available in Google Nexus S

4. Remote views set Background Drawable

5. Many apps disappeared in Android Market this morning

6. ADT export wizard with Proguard obfuscation enabled does not work

7. aidl linking issue, in INetworkQueryService.aidl: couldn't find import for class com.android.phone.INetworkQueryServiceCallback