| java.lang.Object | |||
| ↳ | android.app.Fragment | ||
| ↳ | android.app.DialogFragment | ||
| ↳ | com.steerpath.sdk.maps.defaults.CompassCalibrationFragment | ||
DialogFragment that contains instructions for compass calibration. Example usage:
FragmentManager fragmentManager = getFragmentManager();
CompassCalibrationFragment fragment = CompassCalibrationFragment.newInstance(R.layout.fragment_compass_calibration);
fragment.setOnDismissListener(new DialogInterface.OnDismissListener() {
public void onDismiss(DialogInterface dialogInterface) {
// do something
}
});
fragment.show(fragmentManager, "compass-calibration-fragment");
Added in 3.0.0-rc38
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.app.DialogFragment
| |||||||||||
From interface
android.content.ComponentCallbacks2
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CompassCalibrationFragment() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static boolean |
isCompassCalibrationNeeded(Context context)
Naive method to check if compass needs calibration.
| ||||||||||
| static CompassCalibrationFragment |
newInstance(int layoutResId)
Creates new DialogFragment.
| ||||||||||
| void | onAccuracyChanged(Sensor sensor, int i) | ||||||||||
| void | onCreate(Bundle savedInstanceState) | ||||||||||
| View | onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | ||||||||||
| void | onDismiss(DialogInterface dialog) | ||||||||||
| void | onSensorChanged(SensorEvent sensorEvent) | ||||||||||
| void | onStart() | ||||||||||
| void |
setOnDismissListener(DialogInterface.OnDismissListener listener)
Sets OnDismissListener to notify when DialogFragment has been dismissed.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.app.DialogFragment
| |||||||||||
From class
android.app.Fragment
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.content.ComponentCallbacks
| |||||||||||
From interface
android.content.ComponentCallbacks2
| |||||||||||
From interface
android.content.DialogInterface.OnCancelListener
| |||||||||||
From interface
android.content.DialogInterface.OnDismissListener
| |||||||||||
From interface
android.hardware.SensorEventListener
| |||||||||||
From interface
android.view.View.OnCreateContextMenuListener
| |||||||||||
Naive method to check if compass needs calibration. Calibrate once in hour. Deprecated. Use CompassUtils instead.
Creates new DialogFragment.
Requirements for the layout:
- must contain View with id: @+id/compass_calibration_done
- must contain TextView with id: @+id/compass_calibration_accuracy
Default layout is R.layout.fragment_compass_calibration
Sets OnDismissListener to notify when DialogFragment has been dismissed.