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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:30:42+00:00 2026-05-27T09:30:42+00:00

Im Developing an Application where the ListView with Images will be displayed the text

  • 0

Im Developing an Application where the ListView with Images will be displayed the text data and Images are downloaded from the services. I want to save the data in SQLite also I want to save the thumbnail Images my code is

public class MainActivity extends Activity {
    // TAG for LogCat
public static final String TAG = "SQLiteDebug";
// list view control
    private ListView mListUserInfo; 

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_main);

    // load list view control
    mListUserInfo = (ListView)findViewById(R.id.listUsers);
    // create data creator
    UserInfoCreator creator = new UserInfoCreator(this);
    // open connection
    creator.open();
    // insert data
    creator.insert();     
    // add data to list view through adapter
    mListUserInfo.setAdapter(new UserInfoAdapter(this, creator.queryAll()));//,thumbURLStrings));        
    // close connection
    creator.close();

}
}

Data inserted in

public class UserInfoCreator {


    static String [] thumbURLStrings = null;
    // db adapter
    private UserDbAdapter mDbAdapter;

    /*
     * constructor
     */
    public UserInfoCreator(Context c) {
            mDbAdapter = new UserDbAdapter(c);
    }

    /*
     * open DBAdapter connection
     */
    public void open() {
            mDbAdapter.open();
    }

    /*
     * insert random data
     */
    public void insert() {
    mDbAdapter.insertUser("Toteninsel 100. Fall", 1, "André Marx");
    mDbAdapter.insertUser("Geisterbucht 150. Fall", 2, "Astrid Vollenbruch");
    mDbAdapter.insertUser("Feuermond 125. Fall", 3, "André Marx");
    mDbAdapter.insertUser("Top Secret Edition", 4, "Peter Lerangis");
    mDbAdapter.insertUser("Der dreiTag", 5, "Hendrik Buchna");
    mDbAdapter.insertUser("Die blutenden Bilder", 6, "Kari Erlhoff");

        String xml = XMLfunction.getXML("http://ddfzentrale.europa-websites.de/Zentrale_php/XML/Buecher.xml");
        Document doc = XMLfunction.XMLfromString(xml);

        NodeList nodes = doc.getElementsByTagName("book");
        String [] titleStrings = new String[nodes.getLength()];
        String [] authorStrings = new String[nodes.getLength()];

        Log.d("nodeLength","len: "+nodes.getLength());
        for(int i=0;i < nodes.getLength();i++){

            Element eleBook = (Element)nodes.item(i);
            Log.d("Node_TagName", eleBook.getTagName());
            NodeList titleNode = eleBook.getElementsByTagName("Title");
            Element TitleEle = (Element) titleNode.item(0);
            Log.i("Title", "Title - "+TitleEle.getFirstChild().getNodeValue());
            titleStrings[i]= TitleEle.getFirstChild().getNodeValue();
            NodeList AuthorFName1Node = eleBook.getElementsByTagName("AutorFName1");
            Element AuthorFName1Ele = (Element) AuthorFName1Node.item(0);
            Log.i("AuthorFName1","AuthorFName1 - "+AuthorFName1Ele.getFirstChild().getNodeValue());
            NodeList AuthorLName1Node = eleBook.getElementsByTagName("AutorLName1");
            Element AuthorLName1Ele = (Element) AuthorLName1Node.item(0);
            Log.i("AuthorLName1","AuthorLName1 - "+AuthorLName1Ele.getFirstChild().getNodeValue());
            authorStrings[i]=AuthorFName1Ele.getFirstChild().getNodeValue()+" "+AuthorLName1Ele.getFirstChild().getNodeValue();

           mDbAdapter.insertUser(titleStrings[i], i, authorStrings[i]);


        }
     }

    /*
     * query all user info from db
     */
    public List<UserInfo> queryAll() {
            return mDbAdapter.fetchAllUsers();
    }

    /*
     * close connection
     */
    public void close() {
            mDbAdapter.close();
    }

}

Im parsing and inserting data in same class But with the Text I want to display and show thumbnail Image to display thumbnail with the images I used tutorial https://github.com/thest1/LazyList Please anyone have an Idea about how to store the Images in SQLite Please help me

  • 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-27T09:30:43+00:00Added an answer on May 27, 2026 at 9:30 am

    Check this Code for Inserting images into Database downloading from Server :

    Download Image from Server store it as BLOB and Retrieve it back.

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

Sidebar

Related Questions

I developing an application in which i calling web services on iphone. I want
I am developing an android application that receives data about events from a server.
I am developing an image gallery application .. Its loading images from the internet..
I am developing an android application In which i have a ListView with images.I
I am developing an application,In my application,I am using Listview for displaying data using
I'm developing a small application that reads data from a database and displys it
I am developing one android application, having the listview activity. I displayed the activity.
I developing an application in WPF where a single click on an item will
I developing an application in which i want to print the values on a
I have been developing Android application which has 3 ListView and one ContextMenu for

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.