how to extract the name attribute from string array?

删除回忆录丶 提交于 2019-11-27 14:26:51

You need to use Handler to parse the xml. to get attribute value, code is :

attributes.getValue("name")

Try these links for reference: first and second

Romio

I have made many quizzes, and one nice way is to put correct option always on top, right after question. You can use random function to shuffle options while displaying in an activity.

in Activity: String[] questionArray = getResources().getStringArray(R.id.question); then you have

  • questionArray[0] -> A
  • questionArray[1] -> B
  • questionArray[2] -> C
  • questionArray[3] -> D
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!