There is a RecyclerView , in which the GridLayoutManager applied when launching the program in different versions of android different indents, how can this be fixed?

 rv=(RecyclerView)findViewById(R.id.rv); GridLayoutManager glm = new GridLayoutManager(this, 4, GridLayoutManager.HORIZONTAL, false); rv.setLayoutManager(glm); rv.setHasFixedSize(true); 

here's an example on android 4+

enter image description here

here's an example on android 5+

enter image description here

  • one
    indent explicitly. If you do not specify it, the default value is taken from the current topic, and it seems to be different for different versions - Vladyslav Matviienko
  • and how to do it do not tell me? - java
  • 2
    googling less than a minute, found the answer to your question: stackoverflow.com/questions/28531996/… - Vladyslav Matviienko

0