开发者

How to display a special message if a filtered list view contains no results any more?

开发者 https://www.devze.com 2022-12-21 18:42 出处:网络
Is there any way to show a message such as \"No results\" when i filte开发者_如何学Cr a list?Easy. Next to your list view, add this text view:

Is there any way to show a message such as "No results" when i filte开发者_如何学Cr a list?


Easy. Next to your list view, add this text view:

<TextView android:id="@id/android:empty"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:text="@string/empty_list_message"/>

The ID is important; the ListActivity will look for it.

Emmanuel

0

精彩评论

暂无评论...
验证码 换一张
取 消