Android random multiple choice quiz: how to identify correct answer

后端 未结 2 1617
借酒劲吻你
借酒劲吻你 2021-01-01 09:27

I\'m trying to create a random multiple choice quiz for android. I want to display a random question from a stringarray, with the corresponding answer from another string a

2条回答
  •  -上瘾入骨i
    2021-01-01 09:53

    Here a sample, you can try. This is the data-model like to hold stuffs for the Question-Answer thing.

    
        
            How many questions are asked on Android category daily? 
            
                
                
                
                
            
            
        
    
    
        
            Which band does John Lenon belong to? 
            
                
                
                
                
            
            
        
    
    
    

    Ok, so you everytime you display a question, you got all options to answer, and the correct answer of each question. Just create a proper data structure to hold them. Anyway, just a sample, not a perfect one, but give it a try if you're new on this stuffs ^^!

提交回复
热议问题