Android Open Source - Android-PullToRefreshWithProgressBar Loading Layout Proxy






From Project

Back to project page Android-PullToRefreshWithProgressBar.

License

The source code is released under:

Apache License

If you think the Android project Android-PullToRefreshWithProgressBar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.handmark.pulltorefresh.library;
/*from  ww w.ja  v  a2 s  . co  m*/
import java.util.HashSet;

import android.graphics.Typeface;
import android.graphics.drawable.Drawable;

import com.handmark.pulltorefresh.library.internal.LoadingLayout;

public class LoadingLayoutProxy implements ILoadingLayout {

  private final HashSet<LoadingLayout> mLoadingLayouts;

  LoadingLayoutProxy() {
    mLoadingLayouts = new HashSet<LoadingLayout>();
  }

  /**
   * This allows you to add extra LoadingLayout instances to this proxy. This
   * is only necessary if you keep your own instances, and want to have them
   * included in any
   * {@link PullToRefreshBase#createLoadingLayoutProxy(boolean, boolean)
   * createLoadingLayoutProxy(...)} calls.
   * 
   * @param layout - LoadingLayout to have included.
   */
  public void addLayout(LoadingLayout layout) {
    if (null != layout) {
      mLoadingLayouts.add(layout);
    }
  }

  @Override
  public void setLastUpdatedLabel(CharSequence label) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setLastUpdatedLabel(label);
    }
  }

  @Override
  public void setLoadingDrawable(Drawable drawable) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setLoadingDrawable(drawable);
    }
  }

  @Override
  public void setRefreshingLabel(CharSequence refreshingLabel) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setRefreshingLabel(refreshingLabel);
    }
  }

  @Override
  public void setPullLabel(CharSequence label) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setPullLabel(label);
    }
  }

  @Override
  public void setReleaseLabel(CharSequence label) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setReleaseLabel(label);
    }
  }

  public void setTextTypeface(Typeface tf) {
    for (LoadingLayout layout : mLoadingLayouts) {
      layout.setTextTypeface(tf);
    }
  }
}




Java Source Code List

com.handmark.pulltorefresh.library.ILoadingLayout.java
com.handmark.pulltorefresh.library.IPullToRefresh.java
com.handmark.pulltorefresh.library.LoadingLayoutProxy.java
com.handmark.pulltorefresh.library.OverscrollHelper.java
com.handmark.pulltorefresh.library.PullToRefreshAdapterViewBase.java
com.handmark.pulltorefresh.library.PullToRefreshBase.java
com.handmark.pulltorefresh.library.PullToRefreshExpandableListView.java
com.handmark.pulltorefresh.library.PullToRefreshGridView.java
com.handmark.pulltorefresh.library.PullToRefreshHorizontalScrollView.java
com.handmark.pulltorefresh.library.PullToRefreshListView.java
com.handmark.pulltorefresh.library.PullToRefreshScrollView.java
com.handmark.pulltorefresh.library.PullToRefreshWebView.java
com.handmark.pulltorefresh.library.extras.PullToRefreshWebView2.java
com.handmark.pulltorefresh.library.extras.SoundPullEventListener.java
com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor.java
com.handmark.pulltorefresh.library.internal.FlipLoadingLayout.java
com.handmark.pulltorefresh.library.internal.IndicatorLayout.java
com.handmark.pulltorefresh.library.internal.LoadingLayout.java
com.handmark.pulltorefresh.library.internal.RotateLoadingLayout.java
com.handmark.pulltorefresh.library.internal.Utils.java
com.handmark.pulltorefresh.library.internal.ViewCompat.java