The first button has nothing to write. Ellipsis (...)
Android: ellipsize = "NONE" none, there is no ellipsis.
Android: ellipsize = "start" is omitted to the starting position
Android: ellipsize = "Middle" ellipsis placed in the center
Android: ellipsize = "end": location at the end of the house
Android: ellipsize = "marquee"
<? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: Orientation = "vertical"> <button Android: id = "@ + ID/btn1" Android: layout_width = "100px" Android: layout_height = "wrap_content" Android: text = "0 123456789" Android: singleline = "true" Android: Background = "# f0f"/> <button Android: layout_width = "100px" Android: layout_height = "wrap_content" Android: TEXT = "01 Nicholas Tse 123456789" Android: singleline = "true" Android: ellipsize = "NONE"/> <button Android: layout_width = "100px" Android: layout_height = "wrap_content" Android: text = "02 Chen. guanxi 123456789 "Android: singleline =" true "Android: ellipsize =" start "/> <button Android: layout_width =" 100px "Android: layout_height =" wrap_content "Android: TEXT = "03 Wang Li Hong 123456789" Android: singleline = "true" Android: ellipsize = "Middle"/> <button Android: layout_width = "100px" Android: layout_height = "wrap_content" Android: text = "04 Ren xianqi 123456789" Android: singleline = "true" Android: ellipsize = "end"/> <button Android: id = "@ + ID/BTN" Android: layout_width = "100px" Android: layout_height = "wrap_content" Android: text = "05 Gu tianle 123456789" Android: singleline = "true" Android: ellipsize = "marquee"/> </linearlayout>
Invisible inconspicuous usage
Testactivity. Java
Public class testactivity extends activity {button btn1; button BTN; @ override public void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. main); btn1 = (button) This. findviewbyid (R. id. btn1); BTN = (button) This. findviewbyid (R. id. BTN); BTN. setonclicklistener (New onclicklistener () {public void onclick (view v) {btn1.setvisibility (view. invisible); // gone will directly Delete the first button space }});}}
Click 05. The first button disappears, but which space is occupied,
When gone is used, the first button space is deleted.