berserk

849
reputation
5
13
24

Android developer and freelancer.

Connect with me at Facebook.

private int dpToPx(int dp) { float density = getActivity().getApplicationContext().getResources() .getDisplayMetrics().density; return Math.round((float) dp * density); }

new TypeToken< ArrayList< YourClass>>() { }.getType();

enter image description here

http://www.nerdtests.com/images/ft/nq/e16a60928b.gif