2

I have a list which I want to change the items to be filled from the bottom pragmatically and not from the xml.

Is there a corresponding method for the attribute android:stackFromBottom ?

I want to set it true or false multiple times from the code.

user802421
  • 7,515
  • 5
  • 38
  • 62
user1940676
  • 4,288
  • 8
  • 43
  • 73

1 Answers1

6

You can do like this

listView.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
listView.setStackFromBottom(true);
Biraj Zalavadia
  • 27,812
  • 10
  • 59
  • 76