当前位置: 首页>>代码示例>>Java>>正文


Java DisplayModel.getDefaultUserScaleFactor方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:openbmap,项目名称:radiocells-scanner-android,代码行数:18,代码来源:RadiobeaconApplication.java

示例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);
}
 
开发者ID:emdete,项目名称:Simplicissimus,代码行数:23,代码来源:SamplesApplication.java

示例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);
	}
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:17,代码来源:SamplesApplication.java

示例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);
	}
}
 
开发者ID:saintbyte,项目名称:openbmap,代码行数:13,代码来源:RadiobeaconApplication.java

示例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();
	}
}
 
开发者ID:emdete,项目名称:Simplicissimus,代码行数:16,代码来源:Settings.java


注:本文中的org.mapsforge.map.model.DisplayModel.getDefaultUserScaleFactor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。