@Override public void onStart() { super.onStart(); EasyTracker.getInstance().activityStart(this); final GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mTracker = analytics.getTracker(getString(R.string.ga_trackingId)); mTracker.sendEvent("activity_phone", "start", "phone", 0l); GAServiceManager.getInstance().dispatch(); }
/** Refresh the fragment's list */ public void refresh() { MobclickAgent.onEvent(this, "refresh"); mGaTracker.sendEvent("ui_action", "button_press", "refresh_button", new Long(12345)); /* Attach a rotating ImageView to the refresh item as an ActionView */ LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); ImageView iv = (ImageView) inflater.inflate(R.layout.refresh_action_view, null); Animation rotation = AnimationUtils.loadAnimation(this, R.anim.clockwise_refresh); rotation.setRepeatCount(Animation.INFINITE); iv.startAnimation(rotation); mSGV.setVisibility(View.INVISIBLE); mProgress.setVisibility(View.VISIBLE); mRefreshItem.setActionView(iv); refreshGoodsItems(); }