Moved CompassListener into CompassSensor.java

Change-Id: Id6b1453eff3671b1d59d075c4da8ada6827e2bdd
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-03-14 11:11:37 -04:00
parent f2940419bb
commit eaf205c865
7 changed files with 19 additions and 26 deletions

Binary file not shown.

View File

@@ -6,7 +6,7 @@
*/
package com.TwentyCodes.android.fragments;
import com.TwentyCodes.android.location.CompassListener;
import com.TwentyCodes.android.location.CompassSensor.CompassListener;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.MapView;
import com.TwentyCodes.android.overlays.SkyHookUserOverlay;

View File

@@ -6,7 +6,7 @@
*/
package com.TwentyCodes.android.fragments;
import com.TwentyCodes.android.location.CompassListener;
import com.TwentyCodes.android.location.CompassSensor.CompassListener;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.MapView;
import com.TwentyCodes.android.overlays.UserOverlay;

View File

@@ -1,21 +0,0 @@
/**
* CompassListener.java
* @date Mar 2, 2011
* @author ricky barrette
* @author Twenty Codes, LLC
*/
package com.TwentyCodes.android.location;
/**
* A simple listener interface to get updates from CompassSensor
* @author ricky barrette
*/
public interface CompassListener {
/**
* Called when there is an update from the Compass Sensor
* @param bearing
* @author ricky barrette
*/
public void onCompassUpdate(float bearing);
}

View File

@@ -28,13 +28,27 @@ import com.TwentyCodes.android.debug.Debug;
*/
public class CompassSensor{
/**
* A simple listener interface to get updates from CompassSensor
* @author ricky barrette
*/
public interface CompassListener {
/**
* Called when there is an update from the Compass Sensor
* @param bearing
* @author ricky barrette
*/
public void onCompassUpdate(float bearing);
}
public static final String TAG = "CompassSensor";
private static final int BEARING = 0;
private final Display mDisplay;
private final Handler mHandler;
private final SensorManager mSensorManager;
private final Context mContext;
private CompassListener mListener;
private Context mContext;
private float mDelination = 0;
private final SensorEventListener mCallBack = new SensorEventListener() {

View File

@@ -19,7 +19,7 @@ import android.graphics.RectF;
import android.util.Log;
import com.TwentyCodes.android.debug.Debug;
import com.TwentyCodes.android.location.CompassListener;
import com.TwentyCodes.android.location.CompassSensor.CompassListener;
import com.TwentyCodes.android.location.GeoPointLocationListener;
import com.TwentyCodes.android.location.GeoUtils;
import com.TwentyCodes.android.location.R;

View File

@@ -15,8 +15,8 @@ import android.graphics.Matrix;
import android.graphics.Point;
import android.util.TypedValue;
import com.TwentyCodes.android.location.CompassListener;
import com.TwentyCodes.android.location.CompassSensor;
import com.TwentyCodes.android.location.CompassSensor.CompassListener;
import com.TwentyCodes.android.location.GeoUtils;
import com.TwentyCodes.android.location.R;
import com.google.android.maps.GeoPoint;