Back to project page FAST.
The source code is released under:
GNU General Public License
If you think the Android project FAST listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.ligi.fast.ui; /*from w ww .j a v a 2s. co m*/ import android.content.Context; import org.ligi.fast.App; import org.ligi.fast.R; public class IconDimensions { public final int outerSizeInPx; public final int innerSizeInPx; public IconDimensions(Context context) { String size = (App.getSettings().getIconSize()); int outerSizeRes = R.dimen.cell_size; int innerSizeRes = R.dimen.icon_size; if (size.equals("tiny")) { outerSizeRes = R.dimen.cell_size_tiny; innerSizeRes = R.dimen.icon_size_tiny; } else if (size.equals("small")) { outerSizeRes = R.dimen.cell_size_small; innerSizeRes = R.dimen.icon_size_small; } else if (size.equals("large")) { outerSizeRes = R.dimen.cell_size_large; innerSizeRes = R.dimen.icon_size_large; } outerSizeInPx = context.getResources().getDimensionPixelSize(outerSizeRes); innerSizeInPx = context.getResources().getDimensionPixelSize(innerSizeRes); } }