List of usage examples for android.widget GridView STRETCH_SPACING
int STRETCH_SPACING
To view the source code for android.widget GridView STRETCH_SPACING.
Click Source Link
From source file:net.peterkuterna.android.apps.devoxxfrsched.ui.SpeakersGridFragment.java
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); final GridView gridView = getGridView(); float sf = getResources().getDisplayMetrics().density; final int padding = (int) (5.0 * sf); final int spacing = (int) (20.0 * sf); gridView.setNumColumns(GridView.AUTO_FIT); gridView.setColumnWidth((int) (120 * sf)); gridView.setStretchMode(GridView.STRETCH_SPACING); gridView.setVerticalFadingEdgeEnabled(true); gridView.setPadding(padding, padding, padding, padding); gridView.setHorizontalSpacing(spacing); gridView.setVerticalSpacing(spacing); }