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 6052871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:58:36+00:00 2026-05-23T07:58:36+00:00

I am getting the news information from web. So i can easily get the

  • 0

I am getting the news information from web. So i can easily get the header and subject of news but the problem is how to get the image from json?

Here is my code:

public View getView(int position, View convertView, ViewGroup parent) {
            if (convertView == null) {  
                        convertView = mInflater.inflate(R.layout.haber_yapisi, null); // gets all of the views from adaptor_content and implements their id
                        holder = new ViewHolder();
                        holder.baslik = (TextView) convertView.findViewById(R.id.baslik);
                        holder.haber = (TextView) convertView.findViewById(R.id.haber);
                        holder.resim = (ImageView) convertView.findViewById(R.id.resim);
                        holder.aaa = (TextView) convertView.findViewById(R.id.aaa);
                        holder.bas=(TextView) findViewById(R.id.head_ana);
                        holder.bas.setText("Ana Sayfa");
                        convertView.setTag(holder);   
                      } else {
                        holder = (ViewHolder) convertView.getTag();
                      }

            HttpClient httpclient = new DefaultHttpClient();
            HttpGet httpget = new HttpGet("http://www.dha.com.tr/mobil/anasayfa.asp");
            HttpResponse response;

            try {
                response = httpclient.execute(httpget);
                HttpEntity entity = response.getEntity();
                if (entity != null) {

                 try {
                     InputStream instream = entity.getContent();
                     String line = "";
                     BufferedReader reader = new BufferedReader(new InputStreamReader(instream));
                     StringBuilder json = new StringBuilder();

                    while ((line = reader.readLine()) != null) {
                           json.append(line + "\n");
                     }

                  StringBuilder stringBuilder = new StringBuilder();

                  JSONArray siteler = new JSONArray(json.toString());


                       JSONObject ss = siteler.getJSONObject(position);
                       holder.baslik.setText(ss.getString("strsubject"));
                       holder.haber.setText( ss.getString("strbody") );
                           holder.resim.setImageBitmap("WHAT SHOULD I DO FOR GETTİNG IMAGE")

                  holder.aaa.setText(stringBuilder.toString());

                   instream.close();

                } catch (Exception e) {
                           holder.aaa.setText("Error is: " + e);
                }
             }

           } catch (Exception e) {
                holder.aaa.setText("Error is : " + e);
           }


                        return convertView; 
            }
    }

PLESE HELP!

  • 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-23T07:58:36+00:00Added an answer on May 23, 2026 at 7:58 am

    If your json contains image url you can use

    String imageBaseDirectory = "http://www.dha.com.tr/newpics/news/";
    String imageName = "230620111119295717933.jpg";//get image name from json parsing;
        imageview.setImageURI(Uri.parse(imageBaseDirectory+imageName));
    

    But I can see that the url that you are referring donot contain image url only it contains name of image

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

Sidebar

Related Questions

When i call f_CategoriNewsGet function from Page_Load method I'm getting null. But i can
Getting Json from the Server and displaying it in the grid is relatively straight
I'm doing pretty simple thing here: getting Facebook news feed using their graph API.
This is driving me nuts! I'm getting some JSON from my server: {id262:{done:null,status:null,verfall:null,id:262,bid:20044,art:owner,uid:demo02,aktion:null,termin_datum:null,docid:null,gruppenid:null,news:newsstring,datum:11.06.2010,header:headerstring,for_uid:demo01}, id263:{done:null,status:pending,verfall:null,bid:20044,id:263,uid:demo02,art:foo,aktion:dosomething,termin_datum:11.06.2010,docid:null,gruppenid:null,datum:11.06.2010,news:newsstring,for_uid:demo01,header:headerstring},
i am getting Rss Feed from my DB but i am getting all feeds
Hi i am getting the following exception while fetching the image from server. I
I am getting the value from web service like ><&  etc. I want to
My requirement is to get the news content from different news websites..approximately...250. so news
I am getting news from Yahoo using an RSS feed, using: XML.load(http://finance.yahoo.com/rss/topstories) Yea this
I'm probably just doing something stupid here, but I can't see the cause of

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.