webview进入sherlock片段

时间:2015-12-27 19:13:15

标签: android webview

我在论坛上已经研究过但未能在sherlockfragment中实现webview,我该怎么办?

public class LatestFragment extends SherlockFragment {


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_latest, container, false);
    return rootView;
}   
private WebView web_v;

public class OracoesActivity extends WebviewActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        loadUrl("file:///android_asset/html/oracoes.html", getResources().getString(R.string.menu_about));       
        //loadUrl("http://www.yoursite.com/about.html");
    }
}

}

0 个答案:

没有答案