预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共13页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

HYPERLINK"http://www.ways2u.com/?post=183"http://www.ways2u.com/?post=183 文章地址上 android在线翻译软件 filedinHYPERLINK"http://www.ways2u.com/?sort=18"androidpostbyHYPERLINK"http://www.ways2u.com/?author=1"\o"感性,温柔zzfeihua@163.com"onelongon2010-7-2121:19Wednesday Android在近几年得到了千千万万的开发者和移动厂商的一致好评。Android承诺开源,秉承了Google的一贯作风,开源为移动生产商节约了成本。当然单靠节约成本是不够的,Android系统是一个具有丰富用户体验的手机平台或移动平台,不仅让用户赏心悦目享受到她提供的music、影视、摄影和互联网等丰富的多媒体冲击。如果只有这些,android怎可能流行起来呢?所以android还针对开发者提供了十分丰富的编程接口(api)极其简单地复杂的应用,正因为android对开发者的万般呵护,以致万千开发者热情地投入了android的怀抱,当然我也是其中一个,废话就不多说了!借助“首届Google暑期大学生博客分享大赛——2010Andriod篇”的机会分享android可爱之美吧!下面以在线翻译软件为例子,带大家体验android开发的无穷乐趣吧! 我的英语不怎么好,平时都是依靠电脑上翻译工具完成作业,可是电脑太臃肿了,于是我有了一个异想天开的想法,自己做一个手机翻译软件!DIY,会不会太难了,也许在别的手机系统上,这个的确好难!但是android不一样!开发android应用简单到让你惊讶….. 开发这个软件的思路:本人比较擅长javascript,对Googleapi比较了解,所以想借助Google翻译api结合webView来实现! 参考网站:http://code.google.com/intl/zh-CN/apis/ajaxlanguage/documentation/ google.language.translate(text|option,srcLang,destLang,callback)至于webView的介绍,大家可以参考androiddocs 哈哈,不废话了,下面做第一件事,规划简洁而不单调的用户界面,代码如下: Layout/main.xml <?xmlversion="1.0"encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="right" > <TextView android:layout_marginTop="10px" android:id="@+id/l_about" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/app_name" android:textSize="20sp" android:gravity="center_horizontal" android:typeface="sans" /> <TextView android:layout_marginTop="10px" android:id="@+id/l_select" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <EditText android:layout_marginTop="10px" android:id="@+id/tinput" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="输入要翻译的词或句子" /> <Button android:layout_marginTop="10px" android:id="@+id/submit" android:layout_width="wrap_content" android:layout_heigh