• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

Posts: 2
  • Mark post as helpful
  • send pies
  • 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

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!