I have virtual keyboard using RecyclerView and GridLayoutManager with default spanSize of 11 columns per row.
There are different modes for both English and Russian keyboards, but when I click to change to English keyboard view I need to have keyboard set to 9 columns per row instead of 11, as it is for Russian Keyboard.
How to set different column numbers programmatically?
Wherever you update the keyboard layout, write this:
Every time you call
RecyclerView.setLayoutManager()
, it will simply replace the old layout manager. You can easily swap between 11 columns and 9 columns just by setting a new layout manager.