我正在尝试创建一个与此类似的布局。
我被困在底部。 我无法弄清楚如何设置一个覆盖整个背景的不同背景图像,其宽度和高度位于底部,就像上面底部有浅灰色背景的情况一样。
请帮助!!
感谢。
答案 0 :(得分:1)
它就像(这是伪代码转换为真实的XML):
LinearLayout orientation=vertical width=fill_parent height=30dp background=COLOR
LinearLayout orientation horizontal width=fill_parent height=0dp weight=1
Image wrap_content on width and height
EditText with width=0dp and heigh=fill_parent weight=1
Button wrap_content on width and height
/LinearLayout
LinearLayout orientation horizontal width=fill_parent height=wrap_content
TextView with width=0dp and heigh=wrap_content weight=1 gravity=left
TextView with width=0dp and heigh=wrap_content weight=1 gravity=right
/LinearLayout
/LinearLayout
LinearLayout orientation = vertical width = fill_parent height = 30dp background = COLOR =>您可以在此行中定义整个页脚的背景。其他布局,edittexts,textviews等不应该有背景。