1
正在使用WebView to load HTML file
,它存儲在assets/www
目錄中。從Android動態更改HTML值
HTML文件是:
<!DOCTYPE HTML>
<html>
<head>
<title>PhoneGap</title>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
</head>
<body>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 6,
interval: 6000,
title: '@palafo',
width: 250,
height: 300,
theme: {
shell: {
background: '#ad0000',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#ad0000'
}
},
features: {
scrollbar: true,
loop: false,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'all'
}
}).render().setUser('CareerBuilder').start();
</script>
</body>
</html>
此HTML文件加載Twitter頁面中我的web視圖,使用。
webview.loadUrl("file:///android_asset/www/twitter.html");
現在,我想在這種情況下,用戶名動態更改用戶名,這裏是CareerBuilder網站,現在我想動態更改名字的時候我在我的ListView即CareerBuilder網站點擊X或Y等。
如何做到這一點?
感謝
它不是爲我工作.. – Udaykiran
最新問題?????? –
我無法獲得替換的東西,我試圖通過在腳本中聲明一個變量並使用它來替換它,但它不會將其更改爲Undeclared .. – Udaykiran