1. Download our Official Android App: Forums for Android!

Listview image, text, sqlite

Discussion in 'Android Development' started by extremevb, Aug 29, 2017.

  1. extremevb

    extremevb Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Aug 28, 2017

    Aug 28, 2017
    2
    0
    5
    I've been looking for days for a good example of how to do the following:

    - store images locally (drawable folder)

    - store location of image in database

    - store several text items in the database

    - query database to display a list (custom rows with an image and text)

    a list with several text items

    I guess it would be similar to a movie or recipe database layout
    I'm not sure what I would need to do (ie. type of adapters, etc.)
    I can make a ListView containing several TextViews, but I'm not sure how to add an image to the listview.

    Any advice is appreciated.
     

    Advertisement

    #1 extremevb, Aug 29, 2017
    Last edited: Aug 29, 2017
  2. ArthurGray

    ArthurGray Newbie
    Rank:
     #873
    Points:
    15
    Posts:
    13
    Joined:
    Aug 31, 2017

    Aug 31, 2017
    13
    0
    15
    You have to employ RecyclerView instead of ListView. Here is a good example.
    You can find the code here
     
  3. extremevb

    extremevb Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Aug 28, 2017

    Aug 28, 2017
    2
    0
    5

Share This Page

Loading...