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


Java EmulatorView类代码示例

本文整理汇总了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);
   }
 
开发者ID:josrr,项目名称:crepl,代码行数:39,代码来源:CLAndroid.java

示例2: EmulatorViewGestureListener

import jackpal.androidterm.emulatorview.EmulatorView; //导入依赖的package包/类
public EmulatorViewGestureListener(EmulatorView view) {
    this.view = view;
}
 
开发者ID:josrr,项目名称:crepl,代码行数:4,代码来源:CLAndroid.java


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