本文整理汇总了Java中jackpal.androidterm.emulatorview.EmulatorView类的典型用法代码示例。如果您正苦于以下问题:Java EmulatorView类的具体用法?Java EmulatorView怎么用?Java EmulatorView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EmulatorView类属于jackpal.androidterm.emulatorview包,在下文中一共展示了EmulatorView类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import jackpal.androidterm.emulatorview.EmulatorView; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
esta = this;
Log.w(TAG,"onCreate");
assetManager = getAssets();
SharedPreferences settings = getPreferences(MODE_PRIVATE);
boolean assetsUncompressed = settings.getBoolean("assetsUncompressed", false);
uncompressedFilesDir = getDir(APP_RESOURCES_DIR,MODE_PRIVATE);
Log.w(TAG, "assetsUncompressed:" + assetsUncompressed);
if ( !assetsUncompressed ) {
Log.w(TAG, "descomprimiendo en:" + uncompressedFilesDir);
uncompressDir(RESOURCES_DIR,uncompressedFilesDir);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean("assetsUncompressed", true);
editor.commit();
}
assetsUncompressed = settings.getBoolean("assetsUncompressed", false);
Log.w(TAG, "assetsUncompressed:" + assetsUncompressed);
setContentView(R.layout.main);
IntentFilter filter = new IntentFilter(Constants.BROADCAST_ACTION);
filter.addCategory(Intent.CATEGORY_DEFAULT);
receiver = new ResponseReceiver();
registerReceiver(receiver, filter);
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
emulatorView = (EmulatorView) findViewById(R.id.emulatorView);
Log.w(TAG, "View: " + emulatorView + "\nMetrics: " + metrics);
emulatorView.setDensity(metrics);
emulatorView.setExtGestureListener(new EmulatorViewGestureListener(emulatorView));
Intent intentECL;
intentECL = new Intent(this, ECLTopLevelService.class);
Log.w(TAG, "intentECL:"+intentECL);
this.startService(intentECL);
}
示例2: EmulatorViewGestureListener
import jackpal.androidterm.emulatorview.EmulatorView; //导入依赖的package包/类
public EmulatorViewGestureListener(EmulatorView view) {
this.view = view;
}