2009/06/11

The long way to port my onlinedic on Android platform

P5045763 (by plateaukao)
Cannes.France

坎城除了大家比較熟悉的海邊的星光大道外,
其實在車站的另一個方向有個舊城區。

跟海邊的人潮比起來,
這兒顯得寧靜許多(不過沒有上空美女就是了。
看著清一色的橘紅色屋頂和遠方的山水,晒著不會太炙熱的陽光,
這兒真的很適合度假。
難怪在Bienvenue chez les Chi'tis裡的那個老婆,那麼想要搬到法國南部;
而在南法,特地搬來這兒住的英國人也是屬一屬二多的。

****

After glancing through the basic documents of Android SDK, I still have a lot of work to do before porting my onlinedic to this platform:

1. Find the UI components that I need:
1.1 EditControl
1.2 Button (for start searching)
1.3 HTML viewer
2. How to create and use its menu
3. Find the component to open http requests
4. Find the component to post-process the received html file


As for item 1, it's not so difficult because the UI components I need are few.
Except for the 1.3 HTML viewer, I spent some time to make it work.

First of all, the component to display html content on android is
android.webkit.WebView
You can create this component in the resource and find it by id in the java source code.

Secondly, you need to add a permission line in the Manifest xml file in order to have the access to load URLs.
<uses-permission android:name="android.permission.INTERNET" />

Since I will only use this component to display the processed results of the html, I don't have to study too much about what actions it supports.

As for 2, 3, and 4, I will update later once I know how to accomplish them.

voila, here's the result of today's work:

IMAG0427 (by plateaukao)

****

好久沒到韓風饌吃東西了。
久久吃一次也是不錯的。
新拿到的傢伙太大隻了。
拍起照來手會不穩。
不過,看電子書應該很過癮吧。

IMAG0319 (by plateaukao)

沒有留言:

張貼留言

乩童警探 一二集

接連看了兩集。第一集還算新鮮,到了第二集就看得比較慢了。一來,劇情雖然常會提到乩童,但真的跟乩童又沒有什麼關係。第二集後半大概就猜出是怎麼一回事了,但還是很享受在作者解釋的過程。只是前面舖陳有點久,而且人物有點多,再加上我是斷斷續續的看,看到後來都快忘了誰是誰,或是誰曾經出過什麼...