Nitin Karale
Nitin Karale

Reputation: 799

Listview Footer in Android

I want apply the footer below the list view. The footer is a textview, When list is empty it show the footer, but data searchable then below the list footer is not shown, help me, It is linear layout for android.

Thanks, Nitin

Upvotes: 0

Views: 91

Answers (1)

Maulik Sheth
Maulik Sheth

Reputation: 574

add textview where you want with this attribute

visibility:gone

and in your activity when you do get any data from your search then

text1.setVisibility(View.GONE);

but if your search returns any data then set

visibility as visible to textview

text1.setVisibility(View.VISIBLE);

Upvotes: 1

Related Questions