Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:51:28+00:00 2026-05-28T18:51:28+00:00

I’m new to android,I have an activity class which fetches Json string from url

  • 0

I’m new to android,I have an activity class which fetches Json string from url and convert Json array into an object.I’m getting the objects parsed however the image is returned as textview which is not what I want.
Trying to find a solution I have looking into [here] but this is only giving me the drawable icon not the image I need.Any help or advice will be gratefull

Below is my code.

 ListAdapter adapter = new SimpleAdapter(this, List,
        R.layout.list,
        new String[] {TAG_PHOTOS }, new int[] {
                R.id.image});

setListAdapter(adapter);

// selecting single ListView item
final ListView lv = getListView();

// Launching new screen on Selecting Single ListItem
lv.setOnItemClickListener(new OnItemClickListener() {

    public void onItemClick(AdapterView<?> parent, View view,
            int position, long id) {

        ImageView photoThumbnailUrl = ((ImageView) 
                    view.findViewById(R.id.image)); 
        Bitmap bMap = BitmapFactory.decodeResource(getResources(),
                    R.drawable.ic_launcher);
           Bitmap bMapScaled = Bitmap.createScaledBitmap(bMap, 150, 100, true);
           photoThumbnailUrl.setImageBitmap(bMapScaled);
           photoThumbnailUrl.setImageResource(R.drawable.ic_launcher);
           photoThumbnailUrl.getDrawable();
        System.out.println(photoThumbnailUrl);
        lv.addView(photoThumbnailUrl);


          }
         });    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:51:29+00:00Added an answer on May 28, 2026 at 6:51 pm

    To use imageview in android, you need to customize adapter. and I would recommend you to use LazyAdapter as, you would need this in some time.

    http://codehenge.net/blog/2011/06/android-development-tutorial-asynchronous-lazy-loading-and-caching-of-listview-images/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have main activity which call other object, for example GPS class. This GPS
I have a one android class which extends Activity. public class MainAct extends Activity{
I have this code on my Android phone. URI uri = new URI(url); HttpPost
I have developed some reusable android component which is basically a class . This
I am new to android. I have a loginActivity which validates a user number
I have one activity which download data from the web. In middle of the
I have a strange problem in my android app. I have an activity which
I have an activity which displays some data fetched from the server. If no
I have a alarm manager which is calling an activity class named ScheduleAlert. public
In my Android application, I have a DefaultApplication class which extends android.app.Application , and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.