2

I just want to protect my first item of list view from scrolling or to stick the first item at the top of my layout. I cannot use other layout for that.

Remember other elements must be scroll in that list view.

Can i do that and if yes tell me how ??(with array adapter or custom one or any other method to do that)

please help...

already visited Disable scrolling of a ListView contained within a ScrollView

and Disable scrolling in listview'

but it disable whole list view.

Community
  • 1
  • 1
Mayur Kharche
  • 717
  • 1
  • 8
  • 27

1 Answers1

0

You can use a Header View:

mList.addHeaderView(yourFirstItemView);

Remember to inflate "yourFirstItemView", something like:

LayoutInflater inflater = getLayoutInflater();
yourFirstItemView = inflater.inflate(R.layout.item, parent);
Agustin
  • 114
  • 1
  • 5