Android Sudoku Tutorial in Kotlin #4 - Board Backend and User Input
Вставка
- Опубліковано 3 жов 2024
- Hey everyone, welcome back to the 4th video in the Sudoku Android in Kotlin series! In this video, we hook up our board backend and let users change the state of the board! I hope you enjoy! As always, check out the code on GitHub: github.com/pj6...
@Patrick, sorry to keep bugging you,. but I'm getting the following error:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
I connected the debugger to my device to run it. It has to do with the button.setOnClickListener, I typed it in exactly as you did in your video.
Any idea where i messed up?
Ianyone knows why in the whole second column the values of cells doesn't changing
Was wondering if anyone could explain how this block works::
paintToUse.getTextBounds(valueString, 0, valueString.length, textBounds)
var textWidth = paintToUse.measureText(valueString)
var textHeight = textBounds.height()
Before I call this, I check whether the value for the cell conflicts with something else in the same row, column or small box. I have created another Paint style to use for it (shown below). When it renders, however, the font is really really small..so its not calculating the correct Width and Height when it detects a conflict.
private val conflictTextPaint = Paint().apply{
style= Paint.Style.FILL_AND_STROKE
color = Color.RED
typeface = Typeface.DEFAULT_BOLD
}
Great Video!
Hi Patrick I was watching one of your older videos on how to program pong on a TI83/84 and I was wondering if I could get some help. The ball isn’t on the screen and the paddles don’t move. Thanks
whens the next tutorial?
It should be coming soon. Sorry for the delays, I have been very busy with midterms and work. Thanks for the patience.
Sorry it took so long! Here it is: ua-cam.com/video/LlyM2ImoAaU/v-deo.html
The next one will come out this Thursday, and then I'll be releasing on T/Th from then on.
It's Awesome tutorial series, i am waiting for next video....
Thanks! The video is here, sorry for the delay: ua-cam.com/video/LlyM2ImoAaU/v-deo.html
cool
Totally off topic, but, how do you pronounce your last name?
It is pronounced as Feltis. Lots of people have problems with it!
waiting for next video'
It's here! Sorry for the delay: ua-cam.com/video/LlyM2ImoAaU/v-deo.html