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. Is there anyway to fix it? Thanks
Post you XML so that we can see exactly where the problem is
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|