zoukankan      html  css  js  c++  java
  • sdsd

    package com.bwei.test;

    import com.bwei.adapter.MyAdapter;
    import com.bwei.vo.All;
    import com.bwei.vo.Data;
    import com.bwei.vo.Show;
    import com.google.gson.Gson;
    import com.lidroid.xutils.HttpUtils;
    import com.lidroid.xutils.exception.HttpException;
    import com.lidroid.xutils.http.ResponseInfo;
    import com.lidroid.xutils.http.callback.RequestCallBack;
    import com.lidroid.xutils.http.client.HttpRequest.HttpMethod;

    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.util.Log;
    import android.webkit.WebChromeClient;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;

    public class InfoActivity extends Activity {

        private Data data;
        private WebView wb;
        private String contenttext;
        private String id;
        private String str = "http://93.gov.cn/93app/info.do?id=";

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            // TODO Auto-generated method stub
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_info);

            wb = (WebView) findViewById(R.id.wb);
            Intent intent = getIntent();
            data = (Data) intent.getSerializableExtra("intent");

            id = data.getID();

            HttpUtils httpUtils = new HttpUtils();
            httpUtils.send(HttpMethod.GET, str + id, new RequestCallBack<String>() {

                @Override
                public void onFailure(HttpException arg0, String arg1) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onSuccess(ResponseInfo<String> arg0) {
                    // TODO Auto-generated method stub
                    Gson gson = new Gson();
                    Show show = gson.fromJson(arg0.result, Show.class);
                    contenttext = show.getContenttext();
                      wb.loadDataWithBaseURL(null, contenttext, "text/html", "utf-8", null);  
                      wb.getSettings().setJavaScriptEnabled(true);  
                }
            });

        }
    }

  • 相关阅读:
    把影响集中到一个点
    How to avoid Over-fitting using Regularization?
    适定性问题
    Numerical Differentiation 数值微分
    What Every Computer Scientist Should Know About Floating-Point Arithmetic
    Generally a good method to avoid this is to randomly shuffle the data prior to each epoch of training.
    What is the difference between iterations and epochs in Convolution neural networks?
    Every norm is a convex function
    Moore-Penrose Matrix Inverse 摩尔-彭若斯广义逆 埃尔米特矩阵 Hermitian matrix
    perl 类里的函数调用其他类的函数
  • 原文地址:https://www.cnblogs.com/Zb759260513/p/5403282.html
Copyright © 2011-2022 走看看