android studio grid layout below code example
Example: android grid column
in res/values/dimens.xml:
1
in res/values-w600dp/dimens.xml:
2
in java:
int gridColumns = getResources().getInteger(R.integer.grid_columns);
in res/values/dimens.xml:
1
in res/values-w600dp/dimens.xml:
2
in java:
int gridColumns = getResources().getInteger(R.integer.grid_columns);