硕士生
 
- 金币
- 3879
- 好评
- 76
- 信誉
- 170
|
mt要是能够调用其他软件的翻译就好了。
例如欧路词典的lightpeekactivity
这样翻译功能就会变得更加强大。
我的愿望就是点击'翻译'后,
就直接跳出欧路词典的弹窗,
不用打开mt内部dialog。
但是调用那个activity需要一个上下文参数,mt没有提供,所以无招。
代码在这里
public static void sendToOulu(Context c,String s) {
String string = "com.eusoft.eudic";
String string2 = "com.eusoft.dict.activity.dict.LightpeekActivity";
Intent intent = new Intent("android.intent.action.PROCESS_TEXT");
ComponentName componentName = new ComponentName(string, string2);
intent.setComponent(componentName);
intent.setPackage(string);
intent.setType("text/plain");
intent.putExtra("android.intent.extra.PROCESS_TEXT", (String)s);
c.startActivity(intent);
}
例子在这里(里面就有我插入的代码)
//长按就会调用欧路词典,所以前提得安装了欧路词典)
当然还有我以前为分析开发的FloatLogTool包( |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|