我在我的包中有一個PNG文件,我只是想用它作爲我在webview中通過html加載的圖像的源代碼。作爲webview中的圖像訪問可繪製的資源
到目前爲止,我嘗試過,this,this和this。其中沒有任何實際工作。
這裏是我如何添加img標籤到html。誰能幫我?我試圖建立這樣的早期的SDK版本越好(目前4 [1.6])
String stringPath = "fie:///android_asset/chat_bubble.png";
addOn = String.format("<img src=\"%s\" >", stringPath);
原來是那個該死的缺少'l'整個時間><憎惡錯字錯誤,感謝您發現 – 2011-06-09 18:52:58
:)您的歡迎。 – faradaj 2011-06-09 19:03:49
@faradaj:你知道如何對系統資源做同樣的處理,比如'@android:drawable/ic_menu_info_details.png'? – 2013-12-22 20:14:54