ScrollView 部分布局
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/part_line"
android:layout_above="@id/pay_go"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="5dp"
android:orientation="vertical"
android:id="@+id/pay_main_info">
<include layout="@layout/add_address"
android:id="@+id/address_desc"/>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
/>
<include layout="@layout/pay_other_info"
android:id="@+id/pay_other_info"/>
<View
android:layout_width="match_parent"
android:layout_height="5px"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="桃李园"
android:textSize="25dp"
android:layout_marginLeft="20dp"
android:textColor="@color/black"
android:id="@+id/pay_order_form_canteen_name"/>
<View
android:layout_width="match_parent"
android:layout_height="5px"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
/>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:id="@+id/pay_order_form_foodlist">
</ListView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="添加备注"
android:drawableRight="@mipmap/more"
android:textSize="20dp"
android:layout_marginLeft="20dp"
android:textColor="@color/black"
android:layout_marginRight="20dp"
android:clickable="true"
android:id="@+id/pay_order_form_add_remakes"/>
</LinearLayout>
</ScrollView>
布局效果图:
![图片说明](https://img-ask.csdn.net/upload/201804/24/1524541534_568444.png)
实际效果图:
![图片说明](https://img-ask.csdn.net/upload/201804/24/1524541656_487597.png)
期望效果:
实现类似于饿了么的那种界面,把listview的界面填充出去,如图下:
![图片说明](https://img-ask.csdn.net/upload/201804/24/1524542251_73813.png)
TextView的设置background的bug:
TextView代码:
<TextView
android:id="@+id/add_address_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/text_bg"
android:gravity="center"
android:paddingBottom="20dip"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:paddingTop="20dip"
android:text="+添加收货地址"
android:textColor="@color/theme_blue_two"
android:textSize="30sp"
android:layout_centerHorizontal="true"
/>
效果:
![图片说明](https://img-ask.csdn.net/upload/201804/24/1524542466_880111.png)
background的效果并没有运用上去,附其他可用的TextView的效果,如图下:
![图片说明](https://img-ask.csdn.net/upload/201804/24/1524542599_493676.png)