Android Open Source - mobile2-android Header View

From Project

Back to project page mobile2-android.


The source code is released under:

Apache License

If you think the Android project mobile2-android 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

//w ww.ja  va2  s  .  c  om
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.ProgressBar;


public class HeaderView extends FrameLayout {
    private final ProgressBar busyIndicator;

  public HeaderView(Context context, AttributeSet attrs) {
    this(context, attrs, 0);

  public HeaderView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
        LayoutInflater.from(context).inflate(R.layout.header_view, this, true);
        ECollegeApplication app = (ECollegeApplication)context.getApplicationContext();
        if (app != null) {
        busyIndicator = (ProgressBar) findViewById(;
  public void setProgressVisibility(boolean visible) {
    if (busyIndicator != null) busyIndicator.setVisibility(visible ? VISIBLE : INVISIBLE);

Java Source Code List