Exemplo n.º 1
0
 @Override
 public void onFailure(Object failedReason) {
   // 登录失败
   SysManager.logout();
   SysManager.exitSystem(BaseActivity.this);
   startActivity(new Intent(BaseActivity.this, LoginActivity_.class));
 }
 @Override
 public void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   MobclickAgent.onPageStart(getString(R.string.p10018));
   SysManager.analysis(R.string.p_type_page, R.string.p10018);
 }
Exemplo n.º 3
0
 @Override
 public void onReceive(Context context, Intent intent) {
   int code = intent.getIntExtra("code", 0);
   if (99999 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 重新登录
     RequestCenter.login(
         SharedPreferenceManager.getInstance().getString("lastLoginName", ""),
         SharedPreferenceManager.getInstance().getString("lastLoginPassword", ""),
         loginListener);
   } else if (30001 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 登录失败
     SysManager.logout();
     SysManager.exitSystem(BaseActivity.this);
     startActivity(new Intent(BaseActivity.this, LoginActivity_.class));
   }
 }
 @Override
 public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
   MobclickAgent.onEvent(getActivity(), "8");
   SysManager.analysis(R.string.c_type_click, R.string.c008);
   SystemPromotionDiscovery module =
       (SystemPromotionDiscovery) arg0.getAdapter().getItem(arg2);
   Intent intent = new Intent(getActivity(), WebViewActivity_.class);
   intent.putExtra("targetUri", module.detailUrl);
   intent.putExtra("targetType", WebViewType.getValue(WebViewType.Discovery));
   startActivity(intent);
 }
 @Override
 public void onClick(View v) {
   super.onClick(v);
   switch (v.getId()) {
     case R.id.iv_user_logo:
       startActivity(new Intent(getActivity(), PersonalActivity_.class));
       MobclickAgent.onEvent(getActivity(), "1");
       SysManager.analysis(R.string.c_type_click, R.string.c001);
       break;
     case R.id.rl_setting:
       MobclickAgent.onEvent(getActivity(), "2");
       SysManager.analysis(R.string.c_type_click, R.string.c002);
       startActivity(new Intent(getActivity(), SettingActivity_.class));
       SharedPreferenceManager.getInstance().putBoolean("isClickSetting", true);
       ivVersionFlag.setVisibility(View.GONE);
       break;
     case R.id.iv_scan:
       getActivity().startActivityForResult((new Intent(getActivity(), CaptureActivity.class)), 1);
       break;
   }
 }
 @Override
 public void onClick(View v) {
   // TODO Auto-generated method stub
   switch (v.getId()) {
     case R.id.common_ll_title_back:
       getActivity().finish();
       break;
     case R.id.common_title_text_function:
       // 提交报价
       sendQuotation();
       MobclickAgent.onEvent(getActivity(), "97");
       SysManager.analysis(R.string.c_type_click, R.string.c097);
       break;
     default:
       break;
   }
 }
 @Override
 public void onResume() {
   super.onResume();
   MobclickAgent.onPageStart(getString(R.string.p10001));
   SysManager.analysis(R.string.p_type_page, R.string.p10001);
 }