简体   繁体   中英

how to add buttons at the bottom of the screen and edit text as the third column of the page?

我想创建一个页面,以这样一种方式:应该有一个列表,其中前两列显示产品名称及其成本,第三列应该是用于填充数量的编辑文本。此外,我在底部需要三个按钮页面。我是一个新手,android编程,请帮助

Create a RelativeLayout that contains 2 layouts:

  1. TableLayout for the first requirement.

  2. Another RelativeLayout for keeping buttons at the bottom:

For 3 buttons u set the property android:layout_alignParentBottom="true" . For the 1st button u give android:layout_alignParentLeft="true" and the 2nd button and 3rd buttons u give android:toRightOf="" property.

You will need to use custom Listiview for this pupose. Your mainview will contain a listview and the 3 buttons at the bottoms as you want. Checkout following example for custom listview

Custom Listview

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM