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();