1.如果dimen值写在了dimen.xml中:
int width = (int)context.getResources().getDimension(R.dimen.thumb_img_width);
2.如果dimen值直接写在了layout中:
int width = mMainLeftLayout.getLayoutParams().width;
1.如果dimen值写在了dimen.xml中:
int width = (int)context.getResources().getDimension(R.dimen.thumb_img_width);
2.如果dimen值直接写在了layout中:
int width = mMainLeftLayout.getLayoutParams().width;