editor. putStringSet («BOLAT», boLat);
editor.commit ();
}
if(!mSettings.contains («BOLON»)) {
SharedPreferences. Editor editor = mSettings. edit ();
editor. putStringSet («BOLON», boLon);
editor.commit ();
}
if(!mSettings.contains («CREATURES»)) {
JSONArray creatures = new JSONArray ();
SharedPreferences. Editor editor = mSettings. edit ();
editor.putString("CREATURES",creatures.toString ());
editor.commit ();
}
if(!mSettings.contains («USERLON»)) {
SharedPreferences. Editor editor = mSettings. edit ();
editor. putString («USERLON», «82.9346»);
editor.commit ();
}
if(!mSettings.contains («USERLAT»)) {
SharedPreferences. Editor editor = mSettings. edit ();
editor. putString («USERLAT», «55.0415»);
editor.commit ();
}
checkPermissions ();
mBeyondarFragment = (BeyondarFragmentSupport) getSupportFragmentManager().findFragmentById(R.id.beyondarFragment);
mRadarView = (RadarView) findViewById(R.id.radarView);
mRadarPlugin = new RadarWorldPlugin (this);
mRadarPlugin.setRadarView (mRadarView);
mRadarPlugin.setMaxDistance (100);
CustomWorldHelper.setActivity (this);
mWorld = CustomWorldHelper.generateObjects (this);
mWorld.addPlugin (mRadarPlugin);
mBeyondarFragment.setWorld (mWorld);
LowPassFilter.ALPHA = 0.001f;
BeyondarSensorManager.registerSensorListener (this);
mBeyondarFragment.setMaxDistanceToRender (10);
FloatingActionButton fabAdd = (FloatingActionButton) findViewById(R.id.fabAdd);
fabAdd.setOnClickListener (new View. OnClickListener () {
@Override
public void onClick (View view) {
SelectCreatureDialogFragment dialog = new SelectCreatureDialogFragment ();
dialog.show (getSupportFragmentManager (), «SelectCreatureDialogFragment»);
Вы ознакомились с фрагментом книги.
Приобретайте полный текст книги у нашего партнера: