Тёмный

Saving data with SQLite and adding it to a ListView 

CodingWithMitch
Подписаться 145 тыс.
Просмотров 179 тыс.
50% 1

➤Android SQLite for BEGINNERS Course 2019:
↻ codingwithmitc...
Source Code: github.com/mit...
➤My Keyboard:
↻ goo.gl/1RUqgb
➤My Microphone:
↻ goo.gl/mPh3dk
➤Check out our website:
↻ www.CodingWithM...

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 153   
@andrianharrykennethwong1115
@andrianharrykennethwong1115 4 года назад
Thank you so much man! I searched every tutorial but yours is the only method that works find with me. Subbed!!
@loverofsith
@loverofsith 5 лет назад
Your explanation was very clear thanks that helped my assignment.
@EngrGio
@EngrGio 6 лет назад
After 6 month getting error only sqlite i got the best tutorial! Thank you so much!
@EngrGio
@EngrGio 6 лет назад
I'm also so old!!! Hahahhaha, thank you again. i'll check.
@danieleromanella1267
@danieleromanella1267 6 лет назад
New italian follower. Nice tutorial clean and helpful
@LibbyAudrey
@LibbyAudrey 4 года назад
The best tutorial, honestly dude thank you.
@chiragsharma2467
@chiragsharma2467 4 года назад
thank you sir,, atlast this app is working now i understood it fully ,,,looking ahead for more cool videos like this,,:)
@VocabularyQuests
@VocabularyQuests 8 лет назад
Yellow , I like it so far , 1 month ago i started to learn java , sql and xml with the end goal to learn android dev . Your vids help a lot , looking forward for more , if you have any tips i am all ears .
@martincornelli2149
@martincornelli2149 6 лет назад
Thank you Mitch! This truly helped me, your explanation was very clear!
@walteralvarezok
@walteralvarezok 5 лет назад
very good tutorial, just what I was looking for my project, thanks
@codingwithmitch
@codingwithmitch 5 лет назад
You should watch this course. All the methods I use in this video are outdated. Also this video is bad. Lol. I made this free course for beginners codingwithmitch.com/courses/sqlite-room-persistence-android/
@vahidhoseini1723
@vahidhoseini1723 3 года назад
great, good job mitch.
@feliperbs
@feliperbs 7 лет назад
It's works, thank you from Brazil my friend !!!
@pataratananvisitserngtraku3928
@pataratananvisitserngtraku3928 2 года назад
Thank you so much, Mitch
@joweltisso7365
@joweltisso7365 4 года назад
Thank You.. It helped me alot.. and more of your videos about custom adapter class.. Please keep up the good work.. It means alot.. :)
@shvm4454
@shvm4454 7 лет назад
U nailed it bro thank you so much for grt work its really help me stay alive stay happy :)
@shankarravi4389
@shankarravi4389 5 лет назад
Thanks Mitch... It's working..!!!
@darshanadakane
@darshanadakane 6 лет назад
Thanks Mitch ! This helped me.
@muhammadbilal6865
@muhammadbilal6865 4 года назад
Great tutorial and thank you from pakistan
@priyankashivappa
@priyankashivappa 3 года назад
Thank you so much :). It was of great help.
@mobitips4552
@mobitips4552 6 лет назад
Thank you mate for this wonderful tutorial. Cheers.!!
@sil0star
@sil0star 5 лет назад
Thanks from 2018 Mitch!
@AleenaMalik
@AleenaMalik 7 лет назад
Saved me on a project! Thank you so so much
@umeraman5880
@umeraman5880 7 лет назад
thanks for a very easy and nice tutorial. i just want to know if i can add two values in row or listview
@user-pn5mk3fy1h
@user-pn5mk3fy1h 6 лет назад
thanks for this video. this is what i needed
@virws
@virws 7 лет назад
Thanks for this one! i wasn t finding the tutorial that i needed for what i wanted, but now i got it. Do you have anything on editing or deleting what s in the listview? Thank you very much again! Simple and easy to understand tutorial.
@danielshaulov3083
@danielshaulov3083 4 года назад
LOVE U SO MUCH
@tforce7613
@tforce7613 5 лет назад
Thanks so much for the tutorial.
@eyadmufti
@eyadmufti 5 лет назад
for people who are getting a CRASH !!, you need to put empty space between the word ( FROM ) and the star ( * ) in the database last line . Mr Mitch please make a comment regarding this point . thank .
@codingwithmitch
@codingwithmitch 5 лет назад
These videos are outdated. Now you should be using the "Room Persistence Library" to do SQL transactions on Android. I'll make videos on it soon. It contains convenience methods so you don't need to worry about that stuff.
@PahadiCulture2023
@PahadiCulture2023 6 лет назад
Awsm tutorial....really helpful
@imtiazmamun2862
@imtiazmamun2862 7 лет назад
Thanks Man...It was a great help :)
@aquepaique
@aquepaique 4 года назад
Thanks alot!
@youssefmansour5756
@youssefmansour5756 3 года назад
bruh, this is good. thanks. :3
@TheEinsteintb
@TheEinsteintb 5 лет назад
I spend an hours just to know where is the missing,,, u skip the "myDB = new DatabaseHelper(this);" in MainActivity.class and magically that line is show in 17:33 ,,, anyway thank you for this video ....
@misa4294
@misa4294 5 лет назад
13:19
@mr.fairuz9036
@mr.fairuz9036 3 года назад
this helped me figure out what crashes my app thanks! dude
@sknayab8823
@sknayab8823 4 года назад
this video really helpfull me thanks thanks a lot but how can add three columns in list view please make an video
@JaseerPunathil
@JaseerPunathil 4 года назад
Great Video!!!
@satyamshashankkaran5886
@satyamshashankkaran5886 4 года назад
I tried to run the same code with same interface. My app then keeps on crashing suddenly. The error found in logcat was "NullPointerException: attempt to invoke virtual method Boolean on null reference object in method AddData....." And the indicated line is "Boolean insertData = myDB.addData(newEntry);" I tried to handle with try-catch but it always comes up in catch block whenever I hit add button in the app.. Please help.
@anthonybarbosa7850
@anthonybarbosa7850 4 года назад
Hey Man did you ever figure it out? Im having the same problem.
@charanbirdi6549
@charanbirdi6549 6 лет назад
Thank you !
@emmanueleze8782
@emmanueleze8782 4 года назад
I tried adding a data to the database but I get an error 'Attempt to invoke virtual method on a null object reference' please help me with this
@br4mm3nlogik33
@br4mm3nlogik33 8 лет назад
Shouldn't you use a RecyclerView instead of a ListView?
@isuruwickramanayaka_music
@isuruwickramanayaka_music 7 лет назад
so much helpful bro
@shalakakashid8650
@shalakakashid8650 7 лет назад
thanks it worked!
@md.rejaulkarim9215
@md.rejaulkarim9215 7 лет назад
Thanks man. :D This is the tutorial I was searching for. I need another help with connecting two tables. When I touch table one's any data it will show another related table's data. I would appreciate your reply.
@nabarteyericajoy7673
@nabarteyericajoy7673 5 лет назад
Good sir could you please make a video tutorial about how to save data in a listview but the listview is on another activity.
@Comeonmate7
@Comeonmate7 4 года назад
How would we do the reverse of this? Saving data from an array list into an SQLite database?
@imanakbar2071
@imanakbar2071 6 лет назад
thank you :-D how to create that with multiply column because i need view multiply column with sqlite ? :-D thank you
@kaixonstudio9460
@kaixonstudio9460 5 лет назад
thanks alot
@mahmoodahmed7914
@mahmoodahmed7914 3 года назад
thanks man foe help
@harishankarkannan9198
@harishankarkannan9198 6 лет назад
can u make a vdo on how to implement search in that listview
@alexpeng5977
@alexpeng5977 5 лет назад
I don't understand how myDB in MainActivity and in ViewListContents are the same, or are they not? How come when you add data to myDB in MainActivity you can still finds its contents in myDB inside ViewListContents?
@widimantoine6997
@widimantoine6997 7 лет назад
graet tuto.. Thx. i have a question?? if i already have a listview full of data , and i would like to saving those datas and add it to an other listview... how can i make the condition 'if'?
@MrAbish1
@MrAbish1 4 года назад
How to add data to a cardview?
@fayyazbaloch7028
@fayyazbaloch7028 5 лет назад
great sir.. but i want to this using kotlin programming language so please help me
@waqarsaeed9295
@waqarsaeed9295 6 лет назад
Thanks brother but i have more then one string to display in listview productID,title,price then what to do ..?
@sanaikram9471
@sanaikram9471 5 лет назад
I have some problem, kindly help. my data of the edit text cannot add to the listview
@akashsingh-mm2jr
@akashsingh-mm2jr 5 лет назад
from where you put this...simple_List_item_1 ??
@lougenmagbanua1084
@lougenmagbanua1084 6 лет назад
2018 you hel me bro ... now i can transfer my sqlite data to may string array list class .. lab yeah
@owaismumtaz4731
@owaismumtaz4731 6 лет назад
I want to show data on edittext without using button. When activity opens data can be seen on edittext how can I do it?
@harisrikallakuri4755
@harisrikallakuri4755 7 лет назад
my app is stopping as soon as I click the submit button. it says that there is some null pointer exception in the method AddData(String) so could you help me. it is giving an error that attempt to invoke virtual method boolean DataBaseHelper.addData(java.lang.String) on a null object at AddData
@mirzaharith4583
@mirzaharith4583 6 лет назад
same here. did u find a solution?
@unknownforyou193
@unknownforyou193 8 лет назад
what to do if we have to populate multiple strings..?
@anujkumar-tj1lo
@anujkumar-tj1lo 6 лет назад
when i am clicking on button viewdata for showing data storage so there is written "My data has stopped".................. so now what can i do...........
@KiroKeneki
@KiroKeneki 5 лет назад
Why did you skip writing the code on 2:53
@chiragsharma2467
@chiragsharma2467 4 года назад
though your video helped me understanding various new stuff like cursor,Toast,databasehelper class and calling all the function but after adding viewListContents to manifest its still gets crashed idk why? please help me out
@pallavichavan4096
@pallavichavan4096 7 лет назад
as per video i follow same data get inserted but it is not displayed.when click to view button aap closes..what should i do.help out me
@omersinik3291
@omersinik3291 3 года назад
Thanks . I have 2 list view on my project How can ı do this with 2 listview . (The listviews has diffrent edittext) Can you be fast It's urgent
@RannaBatiWithSusmita
@RannaBatiWithSusmita 7 лет назад
how did your app already had inputs?
@Gardeningwithmayu
@Gardeningwithmayu 7 лет назад
In my app i have considered three textviews and two buttons.In the ouput page i got only first textview details.how can i get the all values from textviews?
@RannaBatiWithSusmita
@RannaBatiWithSusmita 7 лет назад
dont we need to close the datatbase?
@anujkumar-tj1lo
@anujkumar-tj1lo 6 лет назад
and also i want to delete data from database with clicking on a delete button, on second activity ........ what can i do for that...........???
@chiragsharma2467
@chiragsharma2467 4 года назад
my app still get crashed after adding viewlistcontents to android manifest what should i do?
@mjpantaleon400
@mjpantaleon400 5 лет назад
Do you have a tutorial using a custom listview to display the records from the database? Tnx in advance
@codingwithmitch
@codingwithmitch 5 лет назад
Yes you'll find every you need in this free course I made codingwithmitch.com/courses/sqlite-room-persistence-android/
@hashimhussaini3893
@hashimhussaini3893 7 лет назад
data is inserted sql but not show ing in list view..
@swapnilwankhede6801
@swapnilwankhede6801 6 лет назад
hey it is very helpful video tutorial. using this tutorial i am saving data with SQLite . now, i want to get backup of this database on google drive. can you please help me.
@clarencechhoahuasheng5063
@clarencechhoahuasheng5063 7 лет назад
I would like to add another edit text and display in the sub item how to achieve this ?
@rizqiv2
@rizqiv2 6 лет назад
thanks for the good tutorial, but how if i want to click that listview and go to another activity? im still confused how to throw the data from the listview to the new activity. thanks
@mashoodshahid7247
@mashoodshahid7247 6 лет назад
((ListView) yourListView).setOnItemClickListener(new AdapterView.OnItemClickListener(){ public void onItemClick(AdapterView ada, View view, int pos, long l){ String s = arrayList.getItem(pos); if(s.equals("settings")) startActivity(new Intent(getActivity(), yourActivity.class).putExtra(Intent.EXTRA_TEXT, "The data you want to pass to the activity")); } }
@AbdullahJirjees
@AbdullahJirjees 5 лет назад
Sir thanks for this great tutorial but when i follow every step, my code is full of errors and showing red everywhere.
@codingwithmitch
@codingwithmitch 5 лет назад
Watch this my friend codingwithmitch.com/courses/sqlite-room-persistence-android/. It's free
@sukuMART
@sukuMART 5 лет назад
how to implement where clauses with us....
@sorinaion1365
@sorinaion1365 4 года назад
Hi Mitch, Please kindly tell me if you have a video for searching through a dataBase, based on a String that is introduced by the user, and showing in a recyclerView only those rows that contains that specific string. Thank you !
@codingwithmitch
@codingwithmitch 4 года назад
You just need a searchview.
@khubaibsiddiqui2248
@khubaibsiddiqui2248 7 лет назад
error ?????? please elaborate............. while(data.moveToNext()){ theList.add(data.getString(1)); } ListAdapter listAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,theList); listView.setAdapter(listAdapter);
@LeHuynhplus
@LeHuynhplus 7 лет назад
me too :'(
@comsteevapps7914
@comsteevapps7914 6 лет назад
ListAdapter listAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,theList); This will maybe help for you... :) so you have to write cast to adapter.
@faridfirdautama5852
@faridfirdautama5852 3 года назад
Could you share us about "How to check availability records in SQLite based on name" please ? Thank You. in Java & Kotlin if you don't mind
@codingwithmitch
@codingwithmitch 3 года назад
Download Android Studio 4.2 Canary. It has a database viewing tool
@muhammadsafwan4760
@muhammadsafwan4760 6 лет назад
How this app would run on Android device
@dustinnatalaray6068
@dustinnatalaray6068 5 лет назад
How to show it in a textview
@razvann8511
@razvann8511 5 лет назад
IDK how but I break my app with this tutorial...
@codingwithmitch
@codingwithmitch 5 лет назад
This is outdated. The new best practice way to use SQLite on android is with the room persistence library. I have a course on it and it's free codingwithmitch.com/courses/sqlite-room-persistence-android/
@diliprathore1028
@diliprathore1028 6 лет назад
thanks bro..
@AbdullahJirjees
@AbdullahJirjees 5 лет назад
I had re-done again the code, it run smoothly, everything went well but when I keep entering data it shows delay to appear in the view content,
@codingwithmitch
@codingwithmitch 5 лет назад
watch this course. It will answer all your questions, show you best practices, and it's free. codingwithmitch.com/courses/sqlite-room-persistence-android/
@zkk1235
@zkk1235 2 года назад
Hi sir. Please I need source code. Plz sir I request you. 🙏
@Mikey-mb6lb
@Mikey-mb6lb 4 года назад
It does not work!
@jokisam
@jokisam 7 лет назад
how to get new item on top
@christianleal8195
@christianleal8195 4 года назад
if you're looking how to add/save more columns, this is the video he was suppose to link ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8K-6gdTlGEA.html
@NoChillAustin
@NoChillAustin 6 лет назад
Will this still work?
@codingwithmitch
@codingwithmitch 6 лет назад
yep
@proudibeastmode
@proudibeastmode 7 лет назад
Thx for your nice TuT. I Only want to Read Text from my Database MySQL, how to do this ? THX
@proudibeastmode
@proudibeastmode 7 лет назад
Thx for your Answer. But this is not over PHP and mysql, you have a tut how do that?
@yanniks3349
@yanniks3349 7 лет назад
@Mitch Tabian Dear Mitch, I have to save besides a name two different ArrayLists. Is it possible to do this in SQLite ? Because when i am trying to change the Column Values in the DataBaseHelper.class from String to an Arraylist, the program automatically tells me its just possible with a String and changes it back.
@yanniks3349
@yanniks3349 7 лет назад
Thanks for your quick response. Really appreciate it ! You are doing a great Job.
@wendellramos2385
@wendellramos2385 7 лет назад
I followed every step but why my app is still crashing? pls help
@animemania3007
@animemania3007 6 лет назад
if keep crashing then it has error , thats what i think
@animemania3007
@animemania3007 6 лет назад
lol :/
@ranjhamasalih1610
@ranjhamasalih1610 5 лет назад
@@animemania3007 there might be a problem in the database
@snhebbar7277
@snhebbar7277 5 лет назад
Same here
@ranjhamasalih1610
@ranjhamasalih1610 5 лет назад
Use single qoutationa
@mikhacastor4617
@mikhacastor4617 7 лет назад
The app has stopped?
@edwardjohnson9642
@edwardjohnson9642 7 лет назад
Hi there mate, when i tap on the view entries button, the app crashes. Can you help please? I have copied and pasted your code and it will still crashes!! Help please.
@edwardjohnson9642
@edwardjohnson9642 7 лет назад
Here is the link to the stackoverflow post as required. stackoverflow.com/questions/42242026/android-studio-databasehelper-app-crashes
@edwardjohnson9642
@edwardjohnson9642 7 лет назад
Thanks that has worked!!
@Sampelmind81
@Sampelmind81 5 лет назад
hey mitch! di you make a video, where you load information from an sqlite database in a Custom List View? iam working on a projekt an can not go on! thanks a lot :-)!
@codingwithmitch
@codingwithmitch 5 лет назад
Ya watch this it's free codingwithmitch.com/courses/sqlite-room-persistence-android/
@Sampelmind81
@Sampelmind81 5 лет назад
@@codingwithmitch Thank you, i made it! Your tutorials a very helpfully, i ve made an acount on your blogsite!Best regards from Germany!
@haisouhounou6399
@haisouhounou6399 5 лет назад
I followed you but why I can't add data?
@codingwithmitch
@codingwithmitch 5 лет назад
Watch this it's free codingwithmitch.com/courses/sqlite-room-persistence-android/
@ramanantsalamafanomezantso9316
Nice tutorial (y) How to use custom listview on this, i want to put button to edit and delete data? please helpe me, I already try but I do not find :(
@ramanantsalamafanomezantso9316
Thanks, And how to put one or two button in the listview to remove the item
@adnaan8485
@adnaan8485 3 года назад
did you get how to add buttons please help me
@rahulkumar-sw1fw
@rahulkumar-sw1fw 5 лет назад
Sir send video by useing Recycler view in SQLite
@uzairahmad7171
@uzairahmad7171 7 лет назад
Lub u
@mikhacastor4617
@mikhacastor4617 7 лет назад
I copy all your code and Id in each button and edit text also in listview but still the app crashed. even in view the list view help me. theres any thing to add in dependencies in my app or what? i need solution
@mikhacastor4617
@mikhacastor4617 7 лет назад
Sir, I just copy your code in java and also in xml and follow you step by step. the error is when I run the app and add a data, the app stopped but when the edit text is empty and i click the add button it give toast msg. like you did. Errors: - adding data will stop the app (msg "The app has stopped) - viewing data by clicking view data will stop the app (msg "the app has stopped)
@mikhacastor4617
@mikhacastor4617 7 лет назад
Sir. now we fix the error. the space after the table_name, but now the problem is there is no data saved in the listview
@mikhacastor4617
@mikhacastor4617 7 лет назад
OK thank you very much sir mitch, now I fix my own error. youre awesome! Sir, can you make a tutorial about how to implement favorite button in a layout then it will go to favorite activity :) sharedpreference or sqlitedatbase :)
@mikhacastor4617
@mikhacastor4617 7 лет назад
Im talking about that when a video fav button clicked, that video will save to another activity(Favlayout_activity) and that fav video will be store in that activity, even the app will close. maybe put little database?
@sanaikram9471
@sanaikram9471 5 лет назад
@@mikhacastor4617 how you solved this error? i have same problem, no data saved in the listview kindly help
@WAFKLANTV
@WAFKLANTV 7 лет назад
can you make one for login and register pls?
@WAFKLANTV
@WAFKLANTV 7 лет назад
Mitch Tabian thanks alot...I'll check em out now! however...i followed this tutorial and for some reason each time i click add the program crashes
@WAFKLANTV
@WAFKLANTV 7 лет назад
Mitch Tabian true that but the thing is i dnt knw anything when it comes to using sqlite on android studio
@WAFKLANTV
@WAFKLANTV 7 лет назад
Mitch Tabian highly appreciated will check it out now
Далее
DO NOT do this in a Software Engineering Interview
7:59
Поплатился за подлые удары!
01:00
Modularizing Android Apps
18:16
Просмотров 20 тыс.
From Physics Student to Software Engineer
6:22
Просмотров 12 тыс.