Android Open Source - RssReader List Overlay Layout View






From Project

Back to project page RssReader.

License

The source code is released under:

MIT License

If you think the Android project RssReader 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.vicmns.rssreader.views;
/*www  .  ja  va 2 s. c  om*/
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.vicmns.rssreader.R;
import com.vicmns.rssreader.interfaces.ListOverlayLayoutCallbacks;

public class ListOverlayLayoutView {
  private FrameLayout listOverlayLayout;
  private ProgressBar listOverlayprogressBar;
  private LinearLayout listOverlayRetryLayout;
  private TextView listOverlayTextView;
  private Button listOverlayButton;
  private ListOverlayLayoutCallbacks lOverlayLayoutCallbacks;
  
  public ListOverlayLayoutView(FrameLayout listOverlayLayout, 
      ListOverlayLayoutCallbacks lOverlayLayoutCallbacks) {
    
    this.listOverlayLayout = listOverlayLayout;
    this.listOverlayprogressBar = (ProgressBar) listOverlayLayout.findViewById(R.id.list_overlay_progressbar);
    this.listOverlayRetryLayout = (LinearLayout) listOverlayLayout.findViewById(R.id.list_overlay_retry_layout);
    this.listOverlayTextView = (TextView) listOverlayLayout.findViewById(R.id.list_overlay_retry_text_view);
    this.listOverlayButton = (Button) listOverlayLayout.findViewById(R.id.list_overlay_retry_button);
    
    this.lOverlayLayoutCallbacks = lOverlayLayoutCallbacks;
    
    initializeViews();
  }
  
  private void initializeViews() {
    listOverlayButton.setOnClickListener(new OnClickListener() {
      
      @Override
      public void onClick(View v) {
        lOverlayLayoutCallbacks.onRetryClick();
      }
    });
  }
  
  public void showLoadingView() {
    listOverlayprogressBar.setVisibility(View.VISIBLE);
    listOverlayRetryLayout.setVisibility(View.GONE);
  }
  
  public void showOnConnectionErrorViews() {
    listOverlayprogressBar.setVisibility(View.GONE);
    listOverlayRetryLayout.setVisibility(View.VISIBLE);
  }
  
  public void hideOverlayView() {
    listOverlayLayout.setVisibility(View.GONE);
  }
  
  public void hideLoadingView() {
    listOverlayprogressBar.setVisibility(View.GONE);
    listOverlayRetryLayout.setVisibility(View.GONE);
  }
  
  public void hideOnConnectionErrorViews() {
    listOverlayRetryLayout.setVisibility(View.GONE);
  }
}




Java Source Code List

com.vicmns.rssreader.activities.MainActivity.java
com.vicmns.rssreader.activities.RssItemDetailsActivity.java
com.vicmns.rssreader.adapters.RssItemsAdapter.java
com.vicmns.rssreader.app.RssReaderApplication.java
com.vicmns.rssreader.http.GetRssItems.java
com.vicmns.rssreader.http.GetWidgetRssItems.java
com.vicmns.rssreader.http.SimpleXmlRequest.java
com.vicmns.rssreader.interfaces.GetRssItemsCallbacks.java
com.vicmns.rssreader.interfaces.HttpConsumerCallbacks.java
com.vicmns.rssreader.interfaces.ListOverlayLayoutCallbacks.java
com.vicmns.rssreader.models.RssItem.java
com.vicmns.rssreader.models.RssItems.java
com.vicmns.rssreader.services.GetRssItemsService.java
com.vicmns.rssreader.views.ListOverlayLayoutView.java
com.vicmns.rssreader.views.SquareImageView.java
com.vicmns.rssreader.widget.WidgetListProvider.java
com.vicmns.rssreader.widget.WidgetProvider.java
com.vicmns.rssreader.widget.WidgetService.java
fr.castorflex.android.smoothprogressbar.ColorsShape.java
fr.castorflex.android.smoothprogressbar.ContentLoadingSmoothProgressBar.java
fr.castorflex.android.smoothprogressbar.SmoothProgressBarUtils.java
fr.castorflex.android.smoothprogressbar.SmoothProgressBar.java
fr.castorflex.android.smoothprogressbar.SmoothProgressDrawable.java
org.robolectric.shadows.ShadowSupportMenuInflater.java