zoukankan      html  css  js  c++  java
  • SkylineGlobe 移动端开发测试

    基于SkylineGlobe提供的安卓版本SDK,在已有菜单中增加自定义内容,测试代码如下:

    新增加文件ZhaoHeContainer.java

    package com.skyline.terraexplorer.tools;
    
    import java.util.concurrent.Callable;
    
    import android.widget.Toast;
    
    import com.skyline.teapi.IFeatureLayer;
    import com.skyline.teapi.ISGWorld;
    import com.skyline.terraexplorer.R;
    import com.skyline.terraexplorer.TEApp;
    import com.skyline.terraexplorer.models.MenuEntry;
    import com.skyline.terraexplorer.models.UI;
    
    public class ZhaoHeContainer extends BaseToolWithContainer  {
    	@Override
    	public MenuEntry getMenuEntry() {
    		return MenuEntry.createFor(this, R.string.zhaohe_tool, R.drawable.navigate_plus, 80);
    	}
    	@Override
    	public boolean onBeforeOpenToolContainer() {
    	    toolContainer.setText(String.format("New Tool"));
    		toolContainer.addButton(1, R.drawable.label);
    		toolContainer.addButton(2, R.drawable.add_polyline);
    		toolContainer.addButton(3, R.drawable.add_polygon);
    		toolContainer.addButton(4, R.drawable.list);
    		return true;
    	}
    	@Override
    	public void onButtonClick(int tag) {
    		IFeatureLayer layer = null;
    	    switch (tag) {
            case 1:
            	Toast.makeText(TEApp.getAppContext(), "A button 1", Toast.LENGTH_SHORT).show();
                break;
            case 2:
            	Toast.makeText(TEApp.getAppContext(), "A button 2", Toast.LENGTH_SHORT).show();
                break;
            case 3:
            	Toast.makeText(TEApp.getAppContext(), "A button 3", Toast.LENGTH_SHORT).show();
                break;
            case 4: 
            	Toast.makeText(TEApp.getAppContext(), "A button 4", Toast.LENGTH_SHORT).show();
                break;
    	    }	    
    	}
    }
    

     在ToolManager.java中添加:

    registerTool(new ZhaoHeContainer());
    
  • 相关阅读:
    关于xutils中的BitmapUtil实现简单的缓存和下载
    自定义spinner
    Dart格式化输出
    使用 dsc_extractor 导出 dyld_shared_cache_arm64
    iOS11 获取手机已安装应用列表
    恢复二进制文件中的block符号表
    iOS 反反注入 修改__RESTRICT,__restrict工具
    Node的调试
    UVa10131
    UVa116
  • 原文地址:https://www.cnblogs.com/yitianhe/p/5020019.html
Copyright © 2011-2022 走看看