4

I integrated facebook with my applicatin sucessfully and retrieved user details.In my main activity there is a navigation drawer. I want to show the profile picture as the icon and username as text.I can show username as text by

navDrawerItems.add(new NavDrawerItem("Hi  " +full_name, navMenuIcons
                .getResourceId(7, -1)));

Now i want to display my profilepic as the icon. i have the url of the image.how to set the image in second parameter? Please help..Thanks in advance..

Noufal M
  • 163
  • 1
  • 4
  • 12

2 Answers2

0

Well you will most probably need to use an ImageView along with your the text view or Drawer item that you are displaying the name in. You will first though need to make a call to that url and save the result in a bitmap and put that into your image view. There should be a couple of ways to do this. But getting a bitmap from the url you have will probably be the easiest.

Devsil
  • 598
  • 3
  • 16
0

To achieve this task you should have use an image view in navigation drawer then use graph API of Facebook to get profile image.

Faraz Rasheed
  • 37
  • 1
  • 6
  • the two things are already done. how to tranverse the image url to navMenuIcons .getResourceId(7, -1)) is the only problem – Noufal M Sep 15 '15 at 04:27