• Post Reply Bookmark Topic Watch Topic
  • New Topic

Screen Design Problem  RSS feed

 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am designing a layout in android.Where I need one frame and button.The problem I can not make out this.
I tried LinearLayout-->FrameLayout-->Button


Exception is coming.
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to provide layout_width and layout_height on the LinearLayout too...
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also to be able to view the button, you'll have to set the orientation of your linear layout to vertical...
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure why you need two container Layouts(LinearLayout and FrameLayout). You are unnecessarily adding extra level in the view hierarchy.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!