Android: Populating a ListView from the SQLite Database

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I've been literally looking around all day to do something like this and you're the only one doing this in such a simplistic way - thank you so much! too bad I didn't find you earlier today :(

Cousing
Автор

Thank you for this series of DB lessons. Great job teaching me. Kudos and Cheers to you.

duncanrayson
Автор

Had to adapt it to work with a different way of managing databases but it really saved me : ) ty!

aleguevcer
Автор

How does getBaseContext() at 6:09 looks like?

DomeAlonso
Автор

Thank you so much. Made my life easier :)

dinaayoub
Автор

excellent and clear! I did exactly the same and got a runtime error! I checked the cursor before and its not empty

tamirmoav
Автор

Hi, my app has a home screen. Here i click "Players" button which takes me to players screen. Then there is an add button which brings me to the add players screen. When i fill out info suc has name and age etc and click save it saves the "Player" to my db. It then re opens the "Players" screen. I want to display all the players in the db here upon save and opening of this screen.
Is this possible considering you tutorial adds the task on the same screen as it displays, whereas mine goes to a different screen and then does it?

eamonmac
Автор

can you send link of your complete tutorials...related
 to android

CambridgeCS_Station
Автор

Is this video not serialized please? which of your videos precedes this please?

patsnoma
Автор

Great tutorial! what if i want to add a seekbar below the listview so the user can adjust the textsize, please help :(

Shreddstuff
Автор

sir, can you please post a tutorial on populating expandablelistview from the sqlite databse

abhijitdas
Автор

Following these instrctions how can I add a radiobutton? I placed one in the item_layout which created multiple radiobuttons for each row. I also tryed with single_choice instead of item_layout but I dont realy get that oine either.

olliesish
Автор

Hi Sir, it's a great tutorial! But may I know where to get the source code? Couldn't access to the website attached at the description though. Really thanks!

tvxq
Автор

What is the DBAdaper in line 57 of MainActivity.java?
I tried to use but I'm getting error column '1' does not exist, but "1" id the _id value, not the column name.

valdeniralves
Автор

I had to initialize cursor before using it or my app would crash without an error message in the logs, do you know why that is?
What worked:
Cursor cursor;
cursor = myDb.getAllRows();

shackwove
Автор

thx for this, helped me a lot to understand a lot of things... 

i am running in trouble when trying to populate listViews in the case that there is no data in the database available.... the populateListview() in onCreate throws the error - at the moment there is one record inside it works like it should - have you any suggestions or ideas why this happens? 

thx in advance...

aleksstojic
Автор

I get this error message:

"Attempt to invoke virtual method 'void on a null object reference"

On this line:
ListView myList = (ListView)

What could have been the problem? Please help! Thanks in advance! :)

Update: nevermind.. I got it!! thanks again for this tutorial!!

hobbiesandfxtrading
Автор

getting this error when trying to populate the listview: Attempt to invoke virtual method 'android.database.Cursor I have been trying to figure out what's going on. Any ideas?

Tipspot
Автор

I try to copy exatly but it doesnt work

manuelcastillo
Автор

Any idea how can I make the ListView items clickable?

emons