2017-09-21 51 views
0

我想打一個歷史郵件列表,當我點擊customAutoCompleteTextView,並且 我使用BastAdapter做出的紅圈部分我如何使一些項目總是在列表中?

Image is here

,但我不知道如何使「全部清除」項目是什麼總是可見的 ,BTW我不想在歷史列表中添加一個新項目。 我該怎麼辦?

+0

如果你點擊'清除All',要刪除的歷史數據和其他數據.Isn't呢? – KeLiuyue

+1

如果它是一個自定義的'AutoCompleteTextView',並且您正在顯示一個自定義的下拉列表,那麼您可以添加一個頁腳到您正在顯示的下拉列表中,並將「Clear All」添加爲按鈕或「TextView」。 –

+0

@ KeLiuyue這是正確的 –

回答

0

試試這個:

<?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 –

相關問題