Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically replacing Fragments

Stephen Tret
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to replace fragment1 with fragment3 by clicking on a 'Change Fragment' Button defined in fragmen2. Fragment3 will not fully replace Fragment1 completely. Instead it lines itself up underneath the text in Fragment1. I am doing something silly and I could use some pointers. I have included the code here and the output error screenshot (the gray area fragment3 doesn't completely overlay the white area fragment1). Thanks for any pointers.

Code for main.xml:

Code for fragment1:

Code for fragment3:

Code for fragment2:

Java Code behind 'Change Fragment' in fragment2:
[Thumbnail for screenshot.jpg]
fragment3 doesn
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic