English 中文(简体)
1. 在名单上打字
原标题:Setting a footer in a ListView

I need to add a button at the end of my application, without the items covering the button. With my current code the button is being covered by the items in the 名单. I wanna be able to scroll through the 名单 and see all the items, without the button being covered with them. I need button with id "bSave" below the Listview. My XML code:

Button

<LinearLayout android:layout_width="match_parent"
    android:layout_height="wrap_content" android:orientation="vertical"
    android:id="@+id/bottom_control_bar"
    android:layout_alignParentBottom="true">

    <Button android:layout_width="match_parent"
        android:layout_height="wrap_content" android:text="Spara total tid"
        android:id="@+id/bSave" android:textStyle="bold"
        android:visibility="invisible"></Button>
</LinearLayout>

名单

<RelativeLayout
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <名单 android:id="@android:id/list"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_above="@id/bottom_control_bar"></名单>
    <TextView android:id="@android:id/empty"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" />

</RelativeLayout>
最佳回答

你们是否希望总能见到ton子,或者在你读完名单后才会看上去吗? 如果前者使用“<条码>相关中继等内容,则使用一个脚步子,以<条码>、代号/代码>和<条码>。 <编码>view。 如果后者的话,则请<编码>listview.addFooterView,以任何观点通过。

问题回答

Try using a ScrollView http://developer.android.com/reference/android/widget/ScrollView.html

<LinearLayout>
<ScrollView>
</ScrollView>

<Button>
</Button>

</LinearLayout>




相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签