Posts

Showing posts with the label onitemclicklistener

ListView hangs when i click on an Item

ListView hangs when i click on an Item I have a selectWord() function that populates two string and a ArrayList, then it puts them(strings) into ListView and TextView, What I want to do is when someone clicks on the listItem I want the strings and ArrayList to change their values and put new values in TextView and ListView. So I created a function that selects words from text file and then show that data into views, in clickListener what I did is call to the same function again so that it selects data from text file and put it into the views. (a quiz type app, select an option and then next question) I wrote similar code couple of days ago that work. public class MainActivity extends AppCompatActivity { private ArrayList<String> words = new ArrayList<>(); //words list private ArrayList<String> defns = new ArrayList<>(); //deffinitions private String word; private String correct; public ArrayList<String> ra...