本文整理汇总了Java中org.mapsforge.map.model.DisplayModel.getDefaultUserScaleFactor方法的典型用法代码示例。如果您正苦于以下问题:Java DisplayModel.getDefaultUserScaleFactor方法的具体用法?Java DisplayModel.getDefaultUserScaleFactor怎么用?Java DisplayModel.getDefaultUserScaleFactor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mapsforge.map.model.DisplayModel
的用法示例。
在下文中一共展示了DisplayModel.getDefaultUserScaleFactor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.mapsforge.map.model.DisplayModel; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
EventBus.builder().addIndex(new MyEventBusIndex()).installDefaultEventBus();
Intent serviceIntent = new Intent(getApplicationContext(), MasterBrainService.class);
startService(serviceIntent);
AndroidGraphicFactory.createInstance(this);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final float fs = Float.valueOf(preferences.getString(SETTING_SCALE,
Float.toString(DisplayModel.getDefaultUserScaleFactor())));
if (fs != DisplayModel.getDefaultUserScaleFactor()) {
DisplayModel.setDefaultUserScaleFactor(fs);
}
}
示例2: onCreate
import org.mapsforge.map.model.DisplayModel; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
AndroidGraphicFactory.createInstance(this);
Log.e(TAG,
"Device scale factor "
+ Float.toString(DisplayModel.getDeviceScaleFactor()));
SharedPreferences preferences = PreferenceManager
.getDefaultSharedPreferences(this);
float fs = Float.valueOf(preferences.getString(SETTING_SCALE,
Float.toString(DisplayModel.getDefaultUserScaleFactor())));
Log.e(TAG, "User ScaleFactor " + Float.toString(fs));
if (fs != DisplayModel.getDefaultUserScaleFactor()) {
DisplayModel.setDefaultUserScaleFactor(fs);
}
MapFile.wayFilterEnabled = preferences.getBoolean(SETTING_WAYFILTERING, true);
if (MapFile.wayFilterEnabled) {
MapFile.wayFilterDistance = Integer.parseInt(preferences.getString(SETTING_WAYFILTERING_DISTANCE, "20"));
}
MapWorker.DEBUG_TIMING = preferences.getBoolean(SETTING_DEBUG_TIMING, false);
}
示例3: onCreate
import org.mapsforge.map.model.DisplayModel; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
AndroidGraphicFactory.createInstance(this);
Log.e(TAG,
"Device scale factor "
+ Float.toString(DisplayModel.getDeviceScaleFactor()));
SharedPreferences preferences = PreferenceManager
.getDefaultSharedPreferences(this);
float fs = Float.valueOf(preferences.getString(SETTING_SCALE,
Float.toString(DisplayModel.getDefaultUserScaleFactor())));
Log.e(TAG, "User ScaleFactor " + Float.toString(fs));
if (fs != DisplayModel.getDefaultUserScaleFactor()) {
DisplayModel.setDefaultUserScaleFactor(fs);
}
}
示例4: onCreate
import org.mapsforge.map.model.DisplayModel; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Log.i(TAG, "Application created");
AndroidGraphicFactory.createInstance(this);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final float fs = Float.valueOf(preferences.getString(SETTING_SCALE,
Float.toString(DisplayModel.getDefaultUserScaleFactor())));
if (fs != DisplayModel.getDefaultUserScaleFactor()) {
DisplayModel.setDefaultUserScaleFactor(fs);
}
}
示例5: onSharedPreferenceChanged
import org.mapsforge.map.model.DisplayModel; //导入方法依赖的package包/类
@Override
public void onSharedPreferenceChanged(SharedPreferences preferences,
String key) {
if (SamplesApplication.SETTING_SCALE.equals(key)) {
float userScaleFactor = DisplayModel.getDefaultUserScaleFactor();
float fs = Float.valueOf(preferences.getString(
SamplesApplication.SETTING_SCALE,
Float.toString(userScaleFactor)));
if (fs != userScaleFactor) {
DisplayModel.setDefaultUserScaleFactor(fs);
}
} else if (this.renderthemeOptions != null && this.renderthemeOptions.getId().equals(key)) {
createRenderthemeMenu();
}
}