0

I am working on a launcher application in which I want to set the app icons from the bottom of the screen first and then fill upwards. This is important as I want to keep the icons close to the navigation bars. I tried using the LinearLayoutManager and Gravity as well but none of them seems to resolve my issue.

    LinearLayoutManager linearLayoutManager = new 
    LinearLayoutManager(this);
    linearLayoutManager.setReverseLayout(true);
    linearLayoutManager.setStackFromEnd(true);
    appIcons.setLayoutManager(linearLayoutManager);

    LinearLayout layout = new LinearLayout(this);
    layout.setGravity(Gravity.BOTTOM);
    layout.setOrientation(LinearLayout.VERTICAL);
    appIcons.setLayoutParams(layout.getLayoutParams());
AnkitG
  • 95
  • 1
  • 9

1 Answers1

0

Gravity will change only elements inside Liner-Layout. So if the liner-Layout if not match the parent in Hight it won't affect it. This might help you too.

How do I align views at the bottom of the screen?