@Override
    public View getView(int position, View convertView, ViewGroup parent) {
      LogUtil.d(LogUtil.TAG, "message center getView: " + position);
      PTMessageBean bean = messageList.get(position);
      AbstractMessageBussiness bussiness = messageCenter.getService(bean);
      if (bussiness != null) {
        View view;
        if (convertView == null || convertView.getTag() == null) {
          view = bussiness.getNotifyView(bean, null);
        } else {
          view = bussiness.getNotifyView(bean, convertView);
        }
        if (view != null) {
          LogUtil.d(LogUtil.TAG, "message center display view: " + position);
          return view;
        }
      }

      messageList.remove(position);
      LogUtil.d(LogUtil.TAG, "message center display size: " + messageList.size());
      if (messageList.size() == position) {
        refresh();
        notifyDataSetChanged();
        return new View(YellowPageMessageCenterActivity.this);
      } else {
        if (position != 0) {
          position--;
        }
        return getView(position, convertView, parent);
      }
    }
    @Override
    public void putao_onProgressChanged(WebView view, int newProgress) {
      LogUtil.d(TAG, "putao_onProgressChanged progress=" + progress);

      updateProgressBar(newProgress);

      if (progress == 100 && mPageFinished) {
        LogUtil.d(TAG, "close progress2.");
        mHandler.sendEmptyMessage(MSG_DISMISS_DIALOG_ACTION);
      }
    }
    @Override
    public void putao_onPageFinished(WebView view, String url) {
      LogUtil.d(TAG, "onPageFinished progress=" + progress + " url=" + url);

      mPageFinished = true;

      mHandler.removeMessages(MSG_DISMISS_TIMEDOUT_ACTION);
      if (progress == 100) {
        LogUtil.d(TAG, "close progress1.");
        mHandler.sendEmptyMessage(MSG_DISMISS_DIALOG_ACTION);
      }
    }
  private void initData() {
    messageCenter = PTMessageCenterFactory.getPTMessageCenter();
    messageList = messageCenter.loadMessage();
    if (messageList == null) {
      messageList = new ArrayList<PTMessageBean>();
    }

    if (messageList != null && messageList.size() > 0) {
      java.util.Iterator<PTMessageBean> it = messageList.iterator();
      while (it.hasNext()) {
        PTMessageBean bean = it.next();
        IMessageBusiness business = messageCenter.getService(bean);
        if (null == business) {
          it.remove(); // 保证每一条数据业务都能正常识别,去掉错误数据
        }
      }
    }
    LogUtil.d(LogUtil.TAG, "message center init data-messagelist size: " + messageList.size());

    // 以下模拟数据
    /*messageList=new ArrayList<PTMessageBean>();
    for (int i = 0; i < 300; i++) {
        PTMessageBean bean=new PTMessageBean();
        bean.setAction_type("film_all");
        bean.setTime(System.currentTimeMillis()-i*1000000);
        bean.setDigest("电影-星级穿越 3D票2张");
        bean.setSubject("订单等待支付中");

        messageList.add(bean);
    }*/

  }
 private void parseIntent() {
   // TODO Auto-generated method stub
   Intent intent = getIntent();
   if (intent == null) {
     return;
   }
   peccancy = (PeccancyResult) intent.getSerializableExtra(PeccancyResult.class.getSimpleName());
   if (peccancy != null) {
     LogUtil.d(TAG, "peccancy---------" + peccancy.toString());
     String json_detail = peccancy.getDetail_list();
     ArrayList<PeccancyDetailBean> detail_list = getPeccancyDetailList(json_detail);
     if (detail_list != null && detail_list.size() > 0) {
       latestOffence = detail_list.get(0);
       LogUtil.d(TAG, "latestOffence---------" + latestOffence.toString());
     }
   }
 }
  @Override
  protected void configWebSettings() {
    super.configWebSettings();
    latitude = LBSServiceGaode.getLatitude();
    longitude = LBSServiceGaode.getLongitude();
    LogUtil.d(TAG, "configWebSettings latitude=" + latitude + " longitude" + longitude);
    new Thread(
            new Runnable() {
              @Override
              public void run() {
                configUrl();
              }
            })
        .start();

    LogUtil.d(TAG, "start progress.");
    mHandler.sendEmptyMessage(MSG_SHOW_DIALOG_ACTION);
    mHandler.sendEmptyMessageDelayed(MSG_DISMISS_TIMEDOUT_ACTION, TIMEDOUT);
  }
  @Override
  public void onLocationFailed() {
    LBSServiceGaode.deactivate();

    latitude = 0;
    longitude = 0;

    mUrl += "&lat=" + String.valueOf(latitude) + "&lng=" + String.valueOf(longitude);
    LogUtil.d(TAG, "onLocationFailed mUrl=" + mUrl);

    // modify by lisheng 2014-11-19
    loadUrl(mUrl);
    // modify by lisheng end

  }
  @Override
  public void onLocationChanged(String city, double latitude, double longitude, long time) {
    LBSServiceGaode.deactivate();

    this.latitude = latitude;
    this.longitude = longitude;

    mUrl += "&lat=" + String.valueOf(latitude) + "&lng=" + String.valueOf(longitude);
    LogUtil.d(TAG, "onLocationChanged mUrl=" + mUrl);

    // modify by lisheng 2014-11-19
    loadUrl(mUrl);
    // modify by lisheng end

  }
  private void configUrl() {
    if (!TextUtils.isEmpty(mUrl)) {

      /*
      * 每次进入定位影响加载效率,改为十分钟超时 才重新定位,不然则取上一次定位信息
      * update by hyl 2014-8-14
      *  old code :
      *  if(latitude == LBSServiceGaode.DEFAULT_LATITUDE || latitude == 0) {
                     LBSServiceGaode.activate(ContactsApp.getInstance(), this);
                 } else {
                     mUrl+="&lat="+String.valueOf(latitude)+"&lng="+String.valueOf(longitude);
                 }
      */
      LBSServiceGaode.process_activate(ContactsApp.getInstance(), this);
      // update by hyl 2014-8-14

      LogUtil.d(TAG, "url=" + mUrl);
    }
  }
 @Override
 public void putao_onPageStarted(WebView view, String url, Bitmap favicon) {
   LogUtil.d(TAG, "putao_onPageStarted progress=" + progress + " url=" + url);
   mPageFinished = false;
   updateProgressBar(initProgress); // add ljq 2014 11 07 开始读取时制造假进度
 }