![]() | Nested Linear Layout |
|
06 Nov 2012, 13:05
khuong tran (1 post) |
I tried the example on page 40-41 with the nested linearlayout and receive the warning “The LinearLayout layout or its parent is useless …” and it causes the word “Android Sudoku” not to be displayed in the center but left aligned to the button. |
|
06 Nov 2012, 13:33
Anthony Shaw (115 posts) |
Post you XML so that we can see exactly where the problem is |
|
13 Apr 2013, 21:23
Ed Burnette (1316 posts) |
Doing a nested linear layout like that is a bit wasteful and later versions of the SDK do warn about it in the lint warnings. Making it more efficient (for example with a RelativeLayout) is left as an exercise for the reader. This should not cause any alignment problem though. If the alignment is off check the way things are nested, and the values for margins and paddings. |
| You must be logged in to comment |

