Skip to main content
Planned maintenance impacting Stack Overflow and all Stack Exchange sites is scheduled for Monday, September 16, 2024, 5:00 PM-10:00 PM EDT (Monday, September 16, 21:00 UTC- Tuesday, September 17, 2:00 UTC). The email/password authentication method will be unavailable for logging in and registering. Read more here
berserk's user avatar
berserk's user avatar
berserk's user avatar
berserk
  • Member for 10 years, 10 months
  • Last seen this week
Stats
2,718
reputation
1.1m
reached
88
answers
78
questions
Loading…
About

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

3
gold badges
34
silver badges
65
bronze badges
89
Score
162
Posts
98
Posts %
9
Score
14
Posts
8
Posts %
9
Score
4
Posts
2
Posts %
9
Score
4
Posts
2
Posts %
9
Score
3
Posts
2
Posts %
8
Score
6
Posts
4
Posts %
Top posts
View all questions, answers, and articles