• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

if i choose relativelaout it doesn't show me any buttons

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hti is my xml file



it shows 3 buttons.Anyway if i change the LinearLayout to RelativeLayout it doesn't show me any button.It just show the balnk screen.what is wrong with RelativeLayout ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing is wrong with RelativeLayout, but there is probably something wrong with how you're using it. But we can't speculate on what that might be because you didn't post the layout.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the main class we are using

 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:...you didn't post the layout.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first xml that i posted is the layout file.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the LinearLayout that you said works. Post the RelativeLayout that you said didn't work.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the same layout ,only change to the relativelayout.

 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, you assumed RelativeLayout worked just the same as LinearLayout. That's not the case, though. Start reading here: http://developer.android.com/guide/topics/ui/layout/relative.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic