Moved CompassListener into CompassSensor.java
Change-Id: Id6b1453eff3671b1d59d075c4da8ada6827e2bdd Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user