Android Open Source - BungalowAndroidApp R S S Adapter






From Project

Back to project page BungalowAndroidApp.

License

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;
//from  w  ww.j av a  2  s  .c om
import android.app.Service;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class RSSAdapter extends ArrayAdapter<RSSItem> {

  public RSSAdapter(Context context) {
    super(context, R.layout.rss_item);
    // TODO Auto-generated constructor stub
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    View v = convertView;
    if (v == null) {
      LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE);
      v = inflater.inflate(R.layout.rss_item, null);
    }
    TextView tvTitle = (TextView)v.findViewById(R.id.tvTitle);
    TextView tvSummary = (TextView)v.findViewById(R.id.tvSummary);
    RSSItem item = this.getItem(position);
    tvTitle.setText(item.getTitle());
    tvSummary.setText(item.getDescription());
    return v;
  }

}




Java Source Code List

se.aleros.bungalow.BungalowMapFragment.java
se.aleros.bungalow.Bungalow.java
se.aleros.bungalow.MainActivity.java
se.aleros.bungalow.NavigationDrawerFragment.java
se.aleros.bungalow.Place.java
se.aleros.bungalow.RSSAdapter.java
se.aleros.bungalow.RSSDownloadCompleteHandler.java
se.aleros.bungalow.RSSFeed.java
se.aleros.bungalow.RSSItemActivity.java
se.aleros.bungalow.RSSItem.java
se.aleros.bungalow.RSSListFragment.java
se.aleros.bungalow.RssMonitorService.java
se.aleros.bungalow.WebActivity.java