我如何使一些项目总是在列表中?
问题描述:
我想打一个历史邮件列表,当我点击customAutoCompleteTextView
,并且 我使用BastAdapter
做出的红圈部分我如何使一些项目总是在列表中?
,但我不知道如何使“全部清除”项目是什么总是可见的 ,BTW我不想在历史列表中添加一个新项目。 我该怎么办?
答
试试这个:
<?xml version="1.0" encoding="utf-8"?><!-- File created by SkillsOn -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<!--This could be anything that shows your Message list-->
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_below="@+id/clearAll"/>
<!--This is clearAll button and is always visible-->
<Button
android:id="@+id/clearAll"
android:text="Clear all"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"/>
</RelativeLayout>
+0
如何设置CustomAutoCompleteTextView布局,我不是指item_layout –
如果你点击'清除All',要删除的历史数据和其他数据.Isn't呢? – KeLiuyue
如果它是一个自定义的'AutoCompleteTextView',并且您正在显示一个自定义的下拉列表,那么您可以添加一个页脚到您正在显示的下拉列表中,并将“Clear All”添加为按钮或“TextView”。 –
@ KeLiuyue这是正确的 –