Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int getDrawableWidth(Resources resources, int id){
- Bitmap bitmap = BitmapFactory.decodeResource(resources, id);
- return bitmap.getWidth();
- }
- private final int w = getDrawableWidth(getResources(), R.drawable.element)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement