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+
here's an example on android 5+

