android - Button with span disappears of screen -


I am using a table layout to keep the button Now the first button appears in the image that appears, but The one you can not see is the button next to it. This is the only button for the button that I used on Android: layout_span = "2" 'because I think the button wants to capture 2 columns in that row but for some reasons it disappears And the row (blue selection) is suddenly a big height.

Does anyone know how to fix this?

example

activity_main.xml

& lt; Table layout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" Android: id = "@ + id / tablelayout1 "Android: Layout_width =" match_parent "Android: layout_height =" match_parent "tools: reference =" $ {relative package}. $ {ActivityClass} "& gt; & Lt; TableRow Android: id = "@ + id / tableRow1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" & gt; & Lt; Button Android: id = "@ + id / button1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" /> & Lt; Android: Eddie = "@ + ID / Button 2" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_span = "2" Android: text = "button" /> & Lt; / TableRow & gt; & Lt; / TableLayout & gt;

Developer. From android.com
More columns in the form of lines with cells.

Try this sample and see the result

   & Lt; Android: ID = "@ + ID / Button 2" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: layout_span = "2" Android: text = "button" /> & Lt; / TableRow & gt; & Lt; TableRow Android: id = "@ + id / tableRow2" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; Button Android: ID = "@ + ID / Button 12" Android: layout_width = "wrap-content" Android: layout_height = "wrap_content" Android: text = "button" /> & Lt; Button Android: ID = "@ + ID / Button 22" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" /> & Lt; Android: id = "@ + id / button32" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "button" /> & Lt; / TableLayout & gt;  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -