Ejemplo n.º 1
0
  private void getUserPointInfo() {
    mProgressDialog.setCancelable(false);
    mProgressDialog.show();
    Request request = new Request(0, Constant.TYPE_GET_USER_POINT);
    // Object[] params = new Object[2];
    request.setData(mPostUserOrderBody);
    request.addObserver(
        new Observer() {

          @Override
          public void update(Observable observable, Object data) {
            // TODO Auto-generated method stub
            if (data != null) {
              Message msg = Message.obtain(mHandler, ACTION_USER_POINT_INFO, data);
              mHandler.sendMessage(msg);
            } else {
              Request request = (Request) observable;
              if (request.getStatus() == Constant.STATUS_ERROR) {
                mHandler.sendEmptyMessage(ACTION_NETWORK_ERROR);
              }
            }
          }
        });
    mCurrentRequest = request;
    mThemeService.getUserOrder(request);
  }
Ejemplo n.º 2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_score);

    if (!GlobalUtil.isLogin(this)) {
      Intent intent = new Intent(this, LoginActivity.class);
      startActivity(intent);
      finish();
    }
    mThemeService = ThemeService.getServiceInstance(this);
    mUserPointAdapter = new UserPointAdapter(this);
    mProgressDialog = new LoadingDialog(this);
    initHandler();
    initActionBar();
    initView();
  }