zoukankan      html  css  js  c++  java
  • 团队冲刺9

    1.新闻游览界面部分代码

    private void initview() {
    title=findViewById(R.id.datail_title);
    time=findViewById(R.id.datail_time);
    place=findViewById(R.id.datail_place);
    author=findViewById(R.id.datail_author);
    web=findViewById(R.id.web);
    Intent intent = this.getIntent();
    Bean bean=(Bean) intent.getSerializableExtra("bean");
    title.setText(bean.getTitle());
    time.setText(bean.getTime());
    place.setText(bean.getPlace());
    author.setText(bean.getAuthor());
    String data=bean.getContent();
    web.getSettings().setJavaScriptEnabled(true);//启用js
    web.getSettings().setBlockNetworkImage(false);//解决图片不显示
    web.getSettings().setDomStorageEnabled(true);
    if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
    web.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
    }
    web.loadDataWithBaseURL("about:blank",data,"text/html","utf-8",null);
    }
  • 相关阅读:
    UE4 UnLoadStreamLevel
    UE4 Xml读写
    UE4 保存为bitmap
    C++ 不定参数(转)
    C++ 默认参数(转载)
    Tuple初探
    遗传算法matlab实现
    蚁群算法matlab实现
    汉诺塔问题C++实现
    较优H圈matlab实现
  • 原文地址:https://www.cnblogs.com/chenghaixiang/p/14913949.html
Copyright © 2011-2022 走看看