Ejemplo n.º 1
0
 private void insertOutline(Feed feed, Element body) {
   Element outline = new Element("outline");
   String title = feed.getTitle();
   outline.setAttribute("text", title);
   outline.setAttribute("title", title);
   outline.setAttribute("type", "rss");
   outline.setAttribute("xmlUrl", feed.getUrl());
   outline.setAttribute("htmlUrl", feed.getUrl());
   body.addContent(outline);
 }
Ejemplo n.º 2
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.items);

    ItemsFragment items = (ItemsFragment) getSupportFragmentManager().findFragmentById(R.id.items);

    items.setOnItemListener(this);

    String key = getIntent().getStringExtra(EXTRA_FEED_KEY);

    if (key != null) {
      Feed feed = Feed.getFeed(key);

      setTitle(String.format(getString(R.string.feed_title), feed.toString()));
      items.loadUrl(feed.getUrl());
    }
  }