2013-04-01 32 views
0

我想在android应用程序中分页web内容。例如,我使用Flipview来显示网页内容的每一页,并且我不知道如何使用我创建的同一个webview,加载的网址显示在每个flipview页面上。为多页使用一个实例webview

任何人都可以为我提供任何建议!

感谢您的所有建议!

+0

多页来自相同网址?或者多页面意味着你有不同的WebView布局? –

+0

嗨pareshMayani,这意味着多页来自相同的网址 – redwind

回答

0

使用webview.cangoback()属性。

@Override 
public boolean onKeyDown(int keyCode, KeyEvent event) { 
    // Check if the key event was the Back button and if there's history 
    if ((keyCode == KeyEvent.KEYCODE_BACK) && myWebView.canGoBack()) { 
     myWebView.goBack(); 
     return true; 
    } 
    // If it wasn't the Back key or there's no web page history, bubble up to the default 
    // system behavior (probably exit the activity) 
    return super.onKeyDown(keyCode, event); 
} 

欲了解更多详情请访问。 http://developer.android.com/guide/webapps/webview.html

希望这将帮助你

+0

感谢您的帮助,但这不是我所需要的:)。我的意思是,我有一个web浏览器加载了一个url,并且我想为这个网页多次使用每个flipview页面:)。 – redwind