"Swipe" to next screen

by Eddie Ringle » Tue, 20 Apr 2010 20:12:06 GMT

Sponsored Links
 If you look at the Google News & Weather app, you can "swipe" over to the
next page. Anyone know how this is done?
I'm suspecting that it is all one activity, the tabs at the top are a custom
TabView, and it works similar to that?

Eddie Ringle


"Swipe" to next screen

by patbenatar » Wed, 21 Apr 2010 03:26:42 GMT

 I would assume this is done by having the Views you'd like the user to
be able to switch between with a fling of the finger all contained
within one Activity and in that Activity you can listen for
MotionEvents on the currently displaying View. When you detect the
event you're looking for (a swipe, in this case.. although I don't
know how exactly to detect certain gestures) you can use an animation
(Google for "android animation") to push the current View off screen,
replacing it with the next one.

I have seen this tutorial posted on this group before regarding this
topic:  http://whyandroid.com/android/174-flipping-your-views.html  ... 
I have not tried it, however.



Sponsored Links

"Swipe" to next screen

by abisai rangel » Wed, 21 Apr 2010 04:39:29 GMT

 New HP Slate Photos here ----> Website with
photos< http://bizoppoffer.com/x/0/1320/6428/> ;

> >

"Swipe" to next screen

by Eddie Ringle » Wed, 21 Apr 2010 18:14:41 GMT

 Okay, thanks. Just wanted a second opinion.

> >

Other Threads

1. Android Maps Overlay onTap click HELP NEEDED

Hi All,
Could anyone help me with my below program. I'm unable to put a
transparent label containing the contents from my HelloGoogleMaps.java
class  (Hola, Mundo!) when i click the markers(the android icon) in
the map. I would like to have the ontap event do it for different
markers here so that that particular location details is popped up. It
needs to be in a canvas display. Upon clicking this new canvas label,
it should take me to a seperate activity displaying complete details.

I'm using the sample program given in the Google Android Website
and i want to extended it to the next level.

Urgent help needed. Thanks in advance..

Let me know if more infomration is requirred


import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;

public class HelloGoogleMaps extends MapActivity {
     MapController mapController;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        MapView mapView = (MapView) findViewById(R.id.mapview);
        mapController = mapView.getController();
        List<Overlay> mapOverlays = mapView.getOverlays();
        Drawable drawable =
        HelloItemizedOverlay itemizedoverlay = new

        GeoPoint point = new GeoPoint(45005000,-93228900);
        OverlayItem overlayitem = new OverlayItem(point, "Hola,
Mundo!", "I'm in Mexico City!");
        GeoPoint point2 = new GeoPoint(35410000, 139460000);
        OverlayItem overlayitem2 = new OverlayItem(point2, "wow",
"this is tokyo");


    protected boolean isRouteDisplayed() {
        return false;

// HelloItemizedOverlay.java

import java.util.ArrayList;

import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.Toast;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class HelloItemizedOverlay extends ItemizedOverlay {
     private ArrayList<OverlayItem> mOverlays = new
     Context mContext ;

     public HelloItemizedOverlay(Drawable defaultMarker) {

          // TODO Auto-generated constructor stub

     public HelloItemizedOverlay(Drawable defaultMarker, Context
context) {
            mContext = context;

     protected boolean onTap(int index) {
       OverlayItem item = mOverlays.get(index);
       /*// working below code, just replace */
         AlertDialog.Builder dialog = new

       // I need to show another dialog opening up on tapping the
above dialog. Need help here:

       return true;

     public int size() {
       return mOverlays.size();

     protected OverlayItem createItem(int i) {
       return mOverlays.get(i);

     public void addOverlay(OverlayItem overlay) {




Ok does anyone know a good place to download applications for the G1 that 
are not in the Android Market place? That is considering there are any. 

I'm just looking for an insiders way to get more out of my G1. Any help is 
greatly appreciated. 



3. Free Android Phones for Developers

4. "IllegalstateException can not set method after connection" !!!! Help

5. RIL

6. Questions related to porting of a c++ engine

7. I'd like develop Android application.Help me,please.