I am a new android developer . I have create a quiz application where i need to display the questions in list view serially . my all question and options are images. how can i set the images in list view. i want to set only the image in list view not any text . Please help me.
Share
Create a listview in your main xml file like this:
Then create another xml file called child_layout:
Then in your activity class initialize your listview:
Create a class that extends baseadapter and modify all the necessary methods the way you need to (create the constructor that takes a list of drawables as an argument and create a global variable that is set to the provided list). Then do the following in your activity class:
Do this in your getView() function in your customlistadapter class:
ListView item click listener: