Android Open Source - BungalowAndroidApp R S S List Fragment

From Project

Back to project page BungalowAndroidApp.


The source code is released under:

MIT License

If you think the Android project BungalowAndroidApp 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 se.aleros.bungalow;
//w w w  .  ja va 2  s . co m
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.ProgressBar;

 * List fragment dealing with RSS feed
 * @author alecca
 * @extends Fragment
 * @implements RSSDownloadHandler
 * @implements OnItemClickListener
public class RSSListFragment extends Fragment implements RSSDownloadCompleteHandler, OnItemClickListener {
  private RSSFeed feed;
  private ListView listView;
  private ProgressBar progressBar;
  public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    feed = new RSSFeed(null);
    feed.downloadFeedAsync(Bungalow.RSS_URL, this);
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
       View v = inflater.inflate(R.layout.rss_list, container, false);
       this.progressBar = (ProgressBar)v.findViewById(;
       this.listView = (ListView)v.findViewById(;
       this.listView.setAdapter(new RSSAdapter(getActivity()));
       return v;
  public void downloadComplete(RSSFeed feed) {
    // TODO Auto-generated method stub

  public void onItemClick(AdapterView<?> parent, View view, int position,
      long id) {
    // TODO Auto-generated method stub
    RSSItem item = (RSSItem)parent.getItemAtPosition(position);

    Intent i = new Intent(this.getActivity(), RSSItemActivity.class);
    i.putExtra("item", item);

Java Source Code List