I decided to use ListView to solve the problem that I can only display the array of previous memos one by one. So, I first investigated what a List is. To summarize briefly Lists can basically store values in the same way as arrays, but unlike arrays, you can easily insert, change, and delete values after storing them. Also, ListView can display all the elements in List, so you can use it if you just want to display it. And is it compatible with arrays? It's very easy to change from array to list and from list to array type. But if you are new to programming, you need to be careful. , When I changed the contents from the array to List and tried to display it in ListView, I found that if there was a Null value </ strong> in that List, the app would stop without exception. No, I may be the only one who makes such a mistake, but if the application stops at the part using ListView, check if there is a null value in the List with System.out.println (); I want you to. If there is a Null value, that may be the cause of the app stopping. If a Null value is included, it may work properly if you remove it with an If statement. As mentioned above, it was super rudimentary and I could not find it even if I searched. (Maybe I was just not good at searching)
PS
Recommended Posts