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

  • Home
  • SEARCH
  • 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 943425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:26:12+00:00 2026-05-15T22:26:12+00:00

I cant be able to show my data into a listview using this code

  • 0

I cant be able to show my data into a listview using this code which Ive found on a particular website. I am able to show all the images in listview but the data are not there! Someone please help!

db = new DBAdapter(this); 

            toptext = (TextView) findViewById (R.id.toptext); 
            bottomtext = (TextView) findViewById (R.id.bottomtext); 

            ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();

            HashMap<String, String> item;
            for (int i = 0; i < 31; i++) {

                    item = new HashMap<String, String>();
                    item.put("Date:", "Saved Date" );
                    item.put("Title:", "Saved Title");
                    list.add(item);
            }

            SimpleAdapter notes = new SimpleAdapter(this, list, R.layout.view_list,
                                    new String[] { "date", "title" }, 
                                    new int[] {R.id.toptext, R.id.bottomtext });
            setListAdapter(notes);

        } catch(Throwable e){ 

        Log.e("DBAdapter",e.toString()); 

        } 

What should I change or do?
For clearer explanation you can mail me at chuaisarocker@hotmail.com 🙂

  • 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-15T22:26:12+00:00Added an answer on May 15, 2026 at 10:26 pm

    that code looks like an example that assumes that you will fill in the blanks. It doesn’t do anything you want. There are literally 50 good tutorials about to to work with adapters and listviews available. Google is your friend: http://www.google.com/search?hl=&q=android+listview+tutorial

    EDIT:
    I highly recommend that you go back to the beginning… you will not be able to create a decent application if you don’t know the basics. There are lots of java tutorials for beginners on the web and more than enough android development tutorials to get you started along with literally thousands of open source android apps to learn from. If you have $40 to spare I highly recommend that you buy a subscription to CommonsWare: http://commonsware.com/ because it’s the same author as Beginning Android 2 (same book is given in the subscription under a different title) and you get 3 great books with all of the source code. The author posts here on StackOverflow daily and his books and advice have led me from beginner to app author (along with others help).

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

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's results based on my own feature detection tests: var… May 16, 2026 at 3:53 pm
  • Editorial Team
    Editorial Team added an answer It's perfectly normal for ASCII bytes to be represented by… May 16, 2026 at 3:53 pm
  • Editorial Team
    Editorial Team added an answer Try this: http://jsfiddle.net/mTn7G/ var text = $('p').contents().last().text(); The .contents() method… May 16, 2026 at 3:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm using Qwebkit and I like to be able to insert into html table
I'm working on a Qt GUI for visualizing 'live' data which is received via
I am using LINQ to interact with data in a DataSet in a C#.NET
I want to be able to pull the name of the file and url
I'd like to create a slider like in these image galleries. It should show
One can get the text of the selected item in the list-view of a
I have a challenge that I am trying to solve and I can't work
I need help. What seems to be the problem with our php codes? We
Hi I am making a wordpress plugin where I need the Admin to enter
Is there a way to get the Content-Type of the response or conversely set

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.