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,465
  • 5
  • 40
  • 63
user1940676
  • 4,348
  • 9
  • 44
  • 73

1 Answers1

6

You can do like this

listView.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
listView.setStackFromBottom(true);
Biraj Zalavadia
  • 28,348
  • 10
  • 61
  • 77