在弹出的对话框中显示答案

时间:2016-04-13 15:14:32

标签: android json

我有一个存储问题的本地json文件

("Questions ": [
  {
    "question": ".........",
    "answer1": ".......",
    "answer2": " ......",
    "answer3": ".......",
    "correctAnswer: "........"
  },
  {
    "question": ".........",
    "answer1": ".......",
    "answer2": " ......",
    "answer3": ".......",
    "correctAnswer: "........"
})

我创建了xml布局,用于获取数据并将其存储在其上。当用户选择提交答案时,我希望能够显示一个对话框,说明所选答案是否正确/不正确以及显示的正确答案(corrrectAnswer)。怎么做?

// xml布局测验

问(TextView的

ANS1 Ans2(radioButtons) ANS3

  Submit answer
       (Button)

1 个答案:

答案 0 :(得分:2)

addPropertyChangeListener