What are the advantages of adding more country to a java class database instead of using something like SQLite? If I'm trying to do a similar quiz with 500+ images (a flag for all the country and a map with position) should I use SQLite? I'm new to android studio so this method would be easier thanks to this video. Thank you very much, really good tutorial!!
i fixed my previous error ,,, ,In debugging mode the code is fine but while generating signed apk error appears "Error:Error: This class should provide a default constructor (a public constructor with no arguments) (test.quiz.animalquestion) [Instantiatable]"--when searched in internet it says add 'public animalquestion() {}' to class ' which i am not able to understand as iam new in this app making business therefore i request you to make vdeo on this
Hi, Tihomir RAdeff, Thank you for your suggestion. I had a look at this video, but it does not allow for example to go through all the questions and maybe get some right and some wrong. And then start the quiz again but only be given the questions that were answered incorrectly. Are you able to make a video of such feature or at least direct me as to which methods, Shared pref or other things I need to look for? Thanks in advance
hi, can you tell me how to add all the scores to a list and make a score board to display the top scores everytime a player plays the game. Im using your database helper video to create a database, i just need to know how to add scores from this game to that database.
it's not easy to explain. But in video about the database I add simple elements to the database. In the same way you can add every new score to the database. And when you want to view them, just get them from the database and display them in listview for example. I have tutorials about simple listview.
in the database, you created a list and when you hardcode the values in main activity, you are calling the getallcontacts list and that is how contacts are being displayed. I want to know how to create a list for the scores in the flags quiz main activity and I want to know how to link it with the list like get all contacts in database helper
At the end of each game just save the score in the database like I save the items in the MainActivity of the Database tutorial. That way the score will save at the end of the database, and each new score will save after that. And when you are in the scores screen for example you can call the method which gets all elements from the database like I call gel all contacts. I don't see what is bothering you. Apparently you saw and understood the database tutorial. The logic is the same.
I will try it and I will get back to you if I have any further issues. thank you for replying quickly. your videos are really good. keep up the good work
my app is crashing error-- java.lang.RuntimeException: Unable to start activity ComponentInfo{test.quiz/test.quiz.latest}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
Hello Sir I follow your code and make the same application and then I run it after running it's just show blank white screen at my mobile . What is the problem ? please can you help me?
I had the same issue and my problem was that I followed this tutorial but only with 3 countries, so the 4th button never had the chance to get build. So my solution was to add more countries (more than 4 at least). Maybe you are having the same issue.
Are you getting any warning at the log window? If your images are no too big there should be no problem. Let me know if you are getting any warnings otherwise you can send me your code and I can check it up for you.
you missed something. look the code in the newQuestion() method. maybe something in there. or look the code in the buttons. you should change turn number on very click (turn++). Compare your code with the video. maybe something very small but you missed it.
Tihomir RAdeff thank you for replying sir! another question, I followed all your codes but there's an error when I tried to run it. instead of the names of the flags in String[] answers, it shows "res/drawsv24/[name of the flag] then even if i click the correct answer, it says "wrong!" what could be the error sir? thank you!
Put textview to layout, and come mainactivity.java find the turn++ sign in each setonclicklister method. Come below of turn++; Write it: textview.setText 1..2.3..4 You got the idea)
Sorry i am not native speaker, so i changed this sentence into: would've been a good picture if there was you and comment it to the instagram photo of my best friend
If you answers are images insted of buttons you should add imageviews. And in your database instead of text choices you have to add drawable files. It's not that hard but if you are beginner maybe you will not succeed.
what do I need to check if the answer is correct? I have everything else working but in my attempt to compare the answer to the image chosen it never gives a positive response.
I'm getting this error :(
"Access denied finding property "vendor.perf.iop_v3.enable"
Access denied finding property "vendor.perf.iop_v3.enable.debug""
two questions
Is it necessary to carry a database?
And to move to a new activity at the time of winning and play as it would be?
how about if the ;ast question is wrong how can i go to the next activity ?
Hi Ti, query need your help. (1) newQuestion (turn);
Error message: cannot solve method 'newQuestion(int)'.
its random for flag ??
What are the advantages of adding more country to a java class database instead of using something like SQLite? If I'm trying to do a similar quiz with 500+ images (a flag for all the country and a map with position) should I use SQLite? I'm new to android studio so this method would be easier thanks to this video. Thank you very much, really good tutorial!!
sqlite is more complicated and this tutorials should be useful for people which are beginners :)
i fixed my previous error ,,, ,In debugging mode the code is fine but while generating signed apk error appears "Error:Error: This class should provide a default constructor (a public constructor with no arguments) (test.quiz.animalquestion) [Instantiatable]"--when searched in internet it says add 'public animalquestion() {}' to class ' which i am not able to understand as iam new in this app making business therefore i request you to make vdeo on this
Hi, Tihomir RAdeff, Thank you for your suggestion. I had a look at this video, but it does not allow for example to go through all the questions and maybe get some right and some wrong. And then start the quiz again but only be given the questions that were answered incorrectly. Are you able to make a video of such feature or at least direct me as to which methods, Shared pref or other things I need to look for? Thanks in advance
You can save in SharedPreferences the numbers of the questions that are wrong and then show only them. I don't have video about this currently.
How to make databases and store it on shared preferences? Can you do that?
Yes he can, but you cant
muito bom seus vídeos, sou brasileiro mais assisto seus videos
hi, can you tell me how to add all the scores to a list and make a score board to display the top scores everytime a player plays the game. Im using your database helper video to create a database, i just need to know how to add scores from this game to that database.
it's not easy to explain. But in video about the database I add simple elements to the database. In the same way you can add every new score to the database. And when you want to view them, just get them from the database and display them in listview for example. I have tutorials about simple listview.
Also if you want to keep only the top 3 scores for example, it can be with SharedPreferences without database. It would be easier I think.
in the database, you created a list and when you hardcode the values in main activity, you are calling the getallcontacts list and that is how contacts are being displayed.
I want to know how to create a list for the scores in the flags quiz main activity and I want to know how to link it with the list like get all contacts in database helper
At the end of each game just save the score in the database like I save the items in the MainActivity of the Database tutorial. That way the score will save at the end of the database, and each new score will save after that. And when you are in the scores screen for example you can call the method which gets all elements from the database like I call gel all contacts. I don't see what is bothering you. Apparently you saw and understood the database tutorial. The logic is the same.
I will try it and I will get back to you if I have any further issues. thank you for replying quickly. your videos are really good. keep up the good work
hello sir i finnish makimg the apk.but when i run it to cellphone the will be "unfortunately the app was stop. what seems to be the problem?
i got the same problem .
Good morning or night... or afternoon, whatever, thanks for help but i have a query... how to put a question accompanied by the image using textView?
you should use imageview for the image. you cannot add image to textview.
@@TihomirRAdeff Yes, yes, but I'm talking about both, a text and image, text using textview and image with imageview in quiz, it's possible?
Yes it's possible.
why app closed automatically when attempt any wrong question ?
you missed something in the code
maybe you have only one activity in your project..the code finish() will close the activity
Thanks for reply , i got my fault
did you fix this problem?
Same question. Followed everything but still app closes when you tried to press the wrong answer.
the answers not showing in the button. in other words the buttons are empty .. Please help
+Gabriel Farlas watch the video again. you missed something.
the source code please
my app is crashing error-- java.lang.RuntimeException: Unable to start activity ComponentInfo{test.quiz/test.quiz.latest}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
you missed something
how can i make it with audio, what should i do ? , tks
Hello Sir I follow your code and make the same application and then I run it after running it's just show blank white screen at my mobile . What is the problem ? please can you help me?
+khurram khan you missed some code. watch the video again and compare with your code.
I had the same issue and my problem was that I followed this tutorial but only with 3 countries, so the 4th button never had the chance to get build. So my solution was to add more countries (more than 4 at least). Maybe you are having the same issue.
I added 12 countries with same 4 buttons but same problem exist
Are you getting any warning at the log window? If your images are no too big there should be no problem. Let me know if you are getting any warnings otherwise you can send me your code and I can check it up for you.
Bro where i can send you code
? By Email ?
Hi, my app closed when run this line 74: iv_flag.setImageResource(list.get(number - 1).getImage());
+Steve Ngai What is the error?
no error. anyway i found out the issue. after i resize the image to smaller size, it works already. thanks.
how to combine question string with picture into array like that ? tell me pls sir.
you have to make array with custom objects but you need java more java knowledge on this
@@TihomirRAdeff okay sir, i will learn for it. thank you for replying and make this tutorial.
Question sir. when i'm clicking an answer, the image wont change?
you missed something. look the code in the newQuestion() method. maybe something in there. or look the code in the buttons. you should change turn number on very click (turn++). Compare your code with the video. maybe something very small but you missed it.
eleo pilar How to solve 'newQuestion(turn)' problem? 'newQuestion' change red color, it seemed never use it.
hello sir! good day! do you know how to fix this error: contentDescription? it always show a warning sign. thank you so much!
Dannica Mae Tunod you can ignore it
Tihomir RAdeff thank you for replying sir! another question, I followed all your codes but there's an error when I tried to run it. instead of the names of the flags in String[] answers, it shows "res/drawsv24/[name of the flag] then even if i click the correct answer, it says "wrong!" what could be the error sir? thank you!
how can we add score in this?
Put textview to layout, and come mainactivity.java find the turn++ sign in each setonclicklister method. Come below of turn++;
Write it: textview.setText 1..2.3..4
You got the idea)
Buttons are sometimes displayed empty
app closed automatically when attempt wrong answer can you help me?
maybe you have only one activity in your project..the code finish() will close the activity
thankyou !!!!
Would've been a good video if there was sound
Sorry i am not native speaker, so i changed this sentence into: would've been a good picture if there was you and comment it to the instagram photo of my best friend
Imageview is not coming to centre please help
Try to give more information, which type of layout out did you use?
what about choices as images ??
If you answers are images insted of buttons you should add imageviews. And in your database instead of text choices you have to add drawable files. It's not that hard but if you are beginner maybe you will not succeed.
what do I need to check if the answer is correct? I have everything else working but in my attempt to compare the answer to the image chosen it never gives a positive response.
@@stuart6088 what did you do to compare the answers plz help
can u make a flashlight app for me
can u tell how to add score
my Collection.shuffle red text why ??
Rais ilham my question(turn); turn red, why?
Source code please?
Hello, how about non image
jorge pocholo navarro I have tutorial about quiz without images on my channel.
Tihomir RAdeff can I have the link? Please 😊
ua-cam.com/video/JA9s_Fntg_4/v-deo.html
Can u please share source code sirr
i cant ((
thanks a lot!
why app closed automatically when attempt any wrong question ?
Try to delete setonclicklistener: just delete "finish()" method