コード例 #1
0
 @Override
 public void onViewCreated(final Activity activity, final View headerView) {
   super.onViewCreated(activity, headerView);
   setProgressBarStyle(PROGRESS_BAR_STYLE_INSIDE);
   if (ThemeUtils.isColoredActionBar(activity)) {
     setProgressBarColor(Color.WHITE);
   } else {
     setProgressBarColor(ThemeUtils.getUserThemeColor(activity));
   }
 }
  @Override
  public void onViewCreated(Activity activity, View headerView) {
    super.onViewCreated(activity, headerView);

    // Create animations for use later
    mHeaderInAnimation = AnimationUtils.loadAnimation(activity, R.anim.fade_in);
    mHeaderOutAnimation = AnimationUtils.loadAnimation(activity, R.anim.fade_out);

    if (mHeaderOutAnimation != null || mHeaderInAnimation != null) {
      final AnimationCallback callback = new AnimationCallback();
      if (mHeaderOutAnimation != null) {
        mHeaderOutAnimation.setAnimationListener(callback);
      }
    }
  }