Search in sources :

Example 1 with HeaderGridView

use of org.wordpress.android.widgets.HeaderGridView in project WordPress-Android by wordpress-mobile.

the class ThemeBrowserAdapter method configureThemeImageSize.

private void configureThemeImageSize(ViewGroup parent) {
    HeaderGridView gridView = (HeaderGridView) parent.findViewById(R.id.theme_listview);
    int numColumns = gridView.getNumColumns();
    int screenWidth = gridView.getWidth();
    int imageWidth = screenWidth / numColumns;
    if (imageWidth > mViewWidth) {
        mViewWidth = imageWidth;
        AppPrefs.setThemeImageSizeWidth(mViewWidth);
    }
}
Also used : HeaderGridView(org.wordpress.android.widgets.HeaderGridView)

Aggregations

HeaderGridView (org.wordpress.android.widgets.HeaderGridView)1