• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to convert a main activity to a fragment in a Tabbed actionbar

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am a noob with android at the moment so please bear with me.

I am currently building an app with action-bar tabs using fragments.  I have created four fragments with a mainactivity and I am trying to add a 5th fragment with a news feed in it.  Problem is I cannot find a news feed that will fit in a fragment.  I have tried the code below is there anyway I can get this to fit into a fragment.

IN the RSS activity I know I have to change it to extend fragment and I have tried changing the oncreate method to oncreate view, removed the setcontentview and added the rootviiew ectr.. and I have tried just using the RssFragment directly but when I do this nothing happens.

How can I get the RSs newfeeds to work within a fragment?.

My mainactivity



Rss MainActivity



Rss Fragment


 
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic