

Now, you would need to have a variable of type ListView and set it with the reference of the ListView in the layout file. To begin with, you should import ListView from widget, this is done by adding this line import After that, in your activity, there would a default onCreate() function, this would be pre-set to use quickly. There is no implication about the parent layout type. Starting with your XML file, drag and drop it from the widget section. You will get a default activity namely ‘MainActivity’, you can make use of it. For this tutorial to work, just create a new project with any name. ListView provides very simple techniques to set it. ListView is a very easy way to show similar type of data. Submitted by Manu Jemini, on December 12, 2017 In this article, we are going to learn how to initiate a list view for layout in Android?
