mGridLayout = (GridLayout) findViewById(R.id.gridLayout);
columnCount = mGridLayout.getColumnCount();
screenWidth = this.getWindowManager().getDefaultDisplay().getWidth();//获取手机屏幕宽度
Log.e(TAG, "column:" + columnCount + "; screen" + screenWidth);
for (int i = 0; i < mGridLayout.getChildCount(); i++) {
Button button = (Button) mGridLayout.getChildAt(i);
button.setWidth(screenWidth / columnCount);
}