Sha256: 639d0c288c4d9fc0066735d80195bb00dfcd10e44e01b978f4b07ed490370e68

Contents?: true

Size: 1.92 KB

Versions: 8

Compression:

Stored size: 1.92 KB

Contents

package com.jayway.android.robotium.solo;

import java.util.List;

import android.app.Activity;
import android.app.Instrumentation;
import android.graphics.PointF;

public class SoloEnhanced extends Solo {
	private MapViewUtils mapViewUtils;

	public SoloEnhanced(Instrumentation instrumentation, Activity activity) {
		super(instrumentation, activity);
		this.mapViewUtils = new MapViewUtils(instrumentation, viewFetcher, sleeper, waiter);
	}
    public ActivityUtils getActivityUtils() {
        return activityUtils;
    }

	public void setMapCenter( double lat, double lon ) {
		mapViewUtils.setCenter(lat, lon);
	}

	/** @return {lat,lon} */
	public double[] getMapCenter() {
		return mapViewUtils.getMapCenter();
	}

	public void panMapTo( double lat, double lon ) {
		mapViewUtils.panTo(lat, lon);
	}

	public boolean zoomInOnMap() {
		return mapViewUtils.zoomIn();
	}

	public boolean zoomOutOnMap() {
		return mapViewUtils.zoomOut();
	}

	public int setMapZoom( int zoomLevel ) {
		return mapViewUtils.setZoom(zoomLevel);
	}

	public int getMapZoom() {
		return mapViewUtils.getZoom();
	}

	public List<String> getMapMarkerItems() {
		return mapViewUtils.getMarkerItems();
	}

	public String getMapMarkerItem( String title ) {
		return mapViewUtils.getMarkerItem( title );
	}

	/**
	 * @param title
	 * @param timeout in ms
	 * @return
	 */
	public boolean tapMapMarkerItem( String title, long timeout ) {
		return mapViewUtils.tapMarkerItem( title, timeout );
	}

	public boolean tapMapAwayFromMarkers( int step ) {
		return mapViewUtils.tapAwayFromMarkerItems( step );
	}

	/**
	 * @return [top, right, bottom, left] in decimal degrees
	 */
	public List<String> getMapBounds() {
		return mapViewUtils.getBounds();
	}

    public void doubleTapOnScreen(float x, float y) {
        clicker.clickOnScreen(x,y);
        clicker.clickOnScreen(x,y);
    }

    public void runOnMainSync(Runnable runner) {
        instrumentation.runOnMainSync(runner);
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
calabash-android-0.5.2 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.5.2.pre1 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.5.1 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.5.0 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.5.0.pre2 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.5.0.pre1 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.4.22.pre4 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java
calabash-android-0.4.22.pre3 test-server/instrumentation-backend/src/com/jayway/android/robotium/solo/SoloEnhanced.java